e2b 2.53.1__tar.gz → 2.55.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.53.1 → e2b-2.55.0}/PKG-INFO +2 -2
- {e2b-2.53.1 → e2b-2.55.0}/e2b/__init__.py +4 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/templates/get_templates.py +8 -4
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/templates/get_v2_templates.py +8 -4
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/error.py +1 -1
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/sandbox_snapshot_request.py +12 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/template_build_request_v3.py +1 -1
- {e2b-2.53.1 → e2b-2.55.0}/e2b/envd/filesystem/filesystem_pb.py +11 -3
- {e2b-2.53.1 → e2b-2.55.0}/e2b/sandbox/filesystem/filesystem.py +3 -1
- {e2b-2.53.1 → e2b-2.55.0}/e2b/sandbox/sandbox_api.py +78 -43
- {e2b-2.53.1 → e2b-2.55.0}/e2b/sandbox_async/commands/command_handle.py +3 -3
- {e2b-2.53.1 → e2b-2.55.0}/e2b/sandbox_async/main.py +35 -5
- {e2b-2.53.1 → e2b-2.55.0}/e2b/sandbox_async/sandbox_api.py +11 -2
- {e2b-2.53.1 → e2b-2.55.0}/e2b/sandbox_sync/commands/command_handle.py +3 -3
- {e2b-2.53.1 → e2b-2.55.0}/e2b/sandbox_sync/main.py +35 -5
- {e2b-2.53.1 → e2b-2.55.0}/e2b/sandbox_sync/sandbox_api.py +11 -2
- e2b-2.55.0/e2b/template/dockerfile_parser.py +634 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/template/main.py +2 -2
- {e2b-2.53.1 → e2b-2.55.0}/e2b/template/utils.py +9 -5
- {e2b-2.53.1 → e2b-2.55.0}/pyproject.toml +5 -2
- e2b-2.53.1/e2b/template/dockerfile_parser.py +0 -286
- e2b-2.53.1/e2b/template/dockerignore.py +0 -206
- {e2b-2.53.1 → e2b-2.55.0}/README.md +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/__init__.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/__init__.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/__init__.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/sandboxes/__init__.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/sandboxes/delete_sandboxes_sandbox_id.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/sandboxes/get_sandboxes.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/sandboxes/get_sandboxes_metrics.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/sandboxes/get_sandboxes_sandbox_id.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/sandboxes/get_sandboxes_sandbox_id_logs.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/sandboxes/get_sandboxes_sandbox_id_metrics.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/sandboxes/get_v2_sandboxes.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/sandboxes/get_v_2_sandboxes_sandbox_id_logs.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/sandboxes/post_sandboxes.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_connect.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_fork.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_pause.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_refreshes.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_resume.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_snapshots.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_timeout.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/sandboxes/post_v2_sandboxes.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/sandboxes/post_v_2_sandboxes_sandbox_id_connect.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/sandboxes/put_sandboxes_sandbox_id_network.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/secrets/__init__.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/secrets/delete_secrets_secret_id.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/secrets/get_secrets.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/secrets/get_secrets_secret_id.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/secrets/post_secrets.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/secrets/post_secrets_secret_id.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/snapshots/__init__.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/snapshots/get_snapshots.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/tags/__init__.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/tags/delete_templates_tags.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/tags/get_templates_template_id_tags.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/tags/post_templates_tags.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/templates/__init__.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/templates/delete_templates_template_id.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/templates/get_templates_aliases_alias.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/templates/get_templates_template_id.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/templates/get_templates_template_id_builds_build_id_logs.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/templates/get_templates_template_id_builds_build_id_status.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/templates/get_templates_template_id_files_hash.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/templates/patch_templates_template_id.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/templates/patch_v_2_templates_template_id.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/templates/post_v3_templates.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/templates/post_v_2_templates_template_id_builds_build_id.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/volumes/__init__.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/volumes/delete_volumes_volume_id.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/volumes/get_volumes.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/volumes/get_volumes_volume_id.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/api/volumes/post_volumes.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/client.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/errors.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/__init__.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/assign_template_tags_request.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/assigned_template_tags.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/aws_registry.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/aws_registry_type.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/build_log_entry.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/build_status_reason.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/connect_sandbox.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/connect_sandbox_v2.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/delete_template_tags_request.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/gcp_registry.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/gcp_registry_type.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/general_registry.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/general_registry_type.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/listed_sandbox.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/log_level.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/logs_direction.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/logs_source.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/mcp_type_0.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/new_sandbox.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/new_sandbox_v2.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/new_secret.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/new_volume.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/order_direction.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/resumed_sandbox.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/sandbox.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/sandbox_auto_resume_config.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/sandbox_detail.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/sandbox_egress_proxy_config_type_0.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/sandbox_fork_request.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/sandbox_fork_result.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/sandbox_iam.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/sandbox_iam_token.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/sandbox_iam_tokens.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/sandbox_lifecycle.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/sandbox_log.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/sandbox_log_entry.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/sandbox_log_entry_fields.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/sandbox_logs.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/sandbox_logs_v2_response.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/sandbox_metric.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/sandbox_network_config.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/sandbox_network_config_rules.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/sandbox_network_rule.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/sandbox_network_transform.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/sandbox_network_transform_headers.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/sandbox_network_update_config.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/sandbox_network_update_config_rules.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/sandbox_on_timeout.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/sandbox_pause_request.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/sandbox_refresh_request.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/sandbox_state.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/sandbox_timeout_request.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/sandbox_volume_mount.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/sandboxes_with_metrics.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/secret.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/secret_metadata.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/secret_update.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/snapshot_info.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/team_user.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/template.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/template_alias_response.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/template_build.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/template_build_file_upload.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/template_build_file_upload_headers.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/template_build_info.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/template_build_logs_response.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/template_build_start_v2.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/template_build_status.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/template_request_response_v3.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/template_step.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/template_tag.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/template_update_request.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/template_update_response.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/template_with_builds.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/volume.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/models/volume_and_token.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/py.typed +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client/types.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client_async/__init__.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/client_sync/__init__.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/api/metadata.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/client.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/connection_config.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/envd/__init__.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/envd/api.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/envd/client_async/__init__.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/envd/client_shared.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/envd/client_sync/__init__.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/envd/filesystem/__init__.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/envd/filesystem/filesystem_connect.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/envd/interceptors.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/envd/process/__init__.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/envd/process/process_connect.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/envd/process/process_pb.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/envd/rpc.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/envd/utils.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/envd/versions.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/exceptions.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/io_utils.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/paginator.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/py.typed +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/retry.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/sandbox/_git/__init__.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/sandbox/_git/args.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/sandbox/_git/auth.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/sandbox/_git/config.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/sandbox/_git/parse.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/sandbox/_git/types.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/sandbox/commands/command_handle.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/sandbox/commands/main.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/sandbox/filesystem/watch_handle.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/sandbox/iam.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/sandbox/main.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/sandbox/mcp.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/sandbox/network.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/sandbox/signature.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/sandbox/utils.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/sandbox_async/commands/command.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/sandbox_async/commands/pty.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/sandbox_async/filesystem/filesystem.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/sandbox_async/filesystem/watch_handle.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/sandbox_async/git.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/sandbox_async/paginator.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/sandbox_async/utils.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/sandbox_domains.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/sandbox_sync/commands/command.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/sandbox_sync/commands/pty.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/sandbox_sync/filesystem/filesystem.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/sandbox_sync/filesystem/watch_handle.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/sandbox_sync/git.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/sandbox_sync/paginator.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/secret/__init__.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/secret/base.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/secret/secret_async.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/secret/secret_sync.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/secret/types.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/template/consts.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/template/logger.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/template/readycmd.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/template/types.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/template_async/build_api.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/template_async/main.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/template_sync/build_api.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/template_sync/main.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/volume/client/__init__.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/volume/client/api/__init__.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/volume/client/api/volumes/__init__.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/volume/client/api/volumes/delete_volumecontent_volume_id_path.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/volume/client/api/volumes/get_volumecontent_volume_id_dir.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/volume/client/api/volumes/get_volumecontent_volume_id_file.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/volume/client/api/volumes/get_volumecontent_volume_id_path.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/volume/client/api/volumes/patch_volumecontent_volume_id_path.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/volume/client/api/volumes/post_volumecontent_volume_id_dir.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/volume/client/api/volumes/put_volumecontent_volume_id_file.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/volume/client/client.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/volume/client/errors.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/volume/client/models/__init__.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/volume/client/models/error.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/volume/client/models/patch_volumecontent_volume_id_path_body.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/volume/client/models/volume_entry_stat.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/volume/client/models/volume_entry_stat_type.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/volume/client/py.typed +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/volume/client/types.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/volume/client_async/__init__.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/volume/client_sync/__init__.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/volume/connection_config.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/volume/types.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/volume/utils.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/volume/volume_async.py +0 -0
- {e2b-2.53.1 → e2b-2.55.0}/e2b/volume/volume_sync.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: e2b
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.55.0
|
|
4
4
|
Summary: E2B SDK that give agents cloud environments
|
|
5
5
|
Author: e2b
|
|
6
6
|
Author-email: e2b <hello@e2b.dev>
|
|
@@ -13,10 +13,10 @@ Requires-Dist: h2>=4.4.1,<5
|
|
|
13
13
|
Requires-Dist: attrs>=23.2.0
|
|
14
14
|
Requires-Dist: packaging>=24.1
|
|
15
15
|
Requires-Dist: typing-extensions>=4.10.0
|
|
16
|
-
Requires-Dist: dockerfile-parse>=2.0.1,<3
|
|
17
16
|
Requires-Dist: rich>=14.0.0
|
|
18
17
|
Requires-Dist: connectrpc>=0.11.1,<0.12
|
|
19
18
|
Requires-Dist: pyqwest>=0.10.0,<0.11
|
|
19
|
+
Requires-Dist: e2b-dockerfile-utils>=0.1.0,<0.2
|
|
20
20
|
Requires-Python: >=3.10
|
|
21
21
|
Project-URL: Homepage, https://e2b.dev/?utm_source=pypi&utm_medium=referral&utm_campaign=package_homepage&utm_content=e2b
|
|
22
22
|
Project-URL: Repository, https://github.com/e2b-dev/e2b/tree/main/packages/python-sdk
|
|
@@ -109,6 +109,7 @@ from .sandbox.sandbox_api import (
|
|
|
109
109
|
SandboxQuery,
|
|
110
110
|
SandboxState,
|
|
111
111
|
SnapshotInfo,
|
|
112
|
+
SnapshotMode,
|
|
112
113
|
)
|
|
113
114
|
from .sandbox_async.commands.command_handle import AsyncCommandHandle
|
|
114
115
|
from .sandbox_async.filesystem.watch_handle import AsyncWatchHandle
|
|
@@ -133,6 +134,7 @@ from .template.logger import (
|
|
|
133
134
|
LogEntryStart,
|
|
134
135
|
default_build_logger,
|
|
135
136
|
)
|
|
137
|
+
from .template.dockerfile_parser import DockerfileSyntaxError
|
|
136
138
|
from .template.main import TemplateBase, TemplateClass
|
|
137
139
|
from .template.readycmd import (
|
|
138
140
|
ReadyCmd,
|
|
@@ -194,6 +196,7 @@ __all__ = [
|
|
|
194
196
|
"InvalidArgumentException",
|
|
195
197
|
"NotEnoughSpaceException",
|
|
196
198
|
"TemplateException",
|
|
199
|
+
"DockerfileSyntaxError",
|
|
197
200
|
"BuildException",
|
|
198
201
|
"FileUploadException",
|
|
199
202
|
"RateLimitException",
|
|
@@ -257,6 +260,7 @@ __all__ = [
|
|
|
257
260
|
"SecretNotFoundException",
|
|
258
261
|
# Snapshot
|
|
259
262
|
"SnapshotInfo",
|
|
263
|
+
"SnapshotMode",
|
|
260
264
|
"SnapshotPaginator",
|
|
261
265
|
"AsyncSnapshotPaginator",
|
|
262
266
|
# Signature
|
|
@@ -80,7 +80,8 @@ def sync_detailed(
|
|
|
80
80
|
List all templates
|
|
81
81
|
|
|
82
82
|
Args:
|
|
83
|
-
team_id (Union[Unset, str]): Identifier of the team
|
|
83
|
+
team_id (Union[Unset, str]): Identifier of the team, as its UUID or its public project ID
|
|
84
|
+
(prj_)
|
|
84
85
|
|
|
85
86
|
Raises:
|
|
86
87
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
@@ -111,7 +112,8 @@ def sync(
|
|
|
111
112
|
List all templates
|
|
112
113
|
|
|
113
114
|
Args:
|
|
114
|
-
team_id (Union[Unset, str]): Identifier of the team
|
|
115
|
+
team_id (Union[Unset, str]): Identifier of the team, as its UUID or its public project ID
|
|
116
|
+
(prj_)
|
|
115
117
|
|
|
116
118
|
Raises:
|
|
117
119
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
@@ -137,7 +139,8 @@ async def asyncio_detailed(
|
|
|
137
139
|
List all templates
|
|
138
140
|
|
|
139
141
|
Args:
|
|
140
|
-
team_id (Union[Unset, str]): Identifier of the team
|
|
142
|
+
team_id (Union[Unset, str]): Identifier of the team, as its UUID or its public project ID
|
|
143
|
+
(prj_)
|
|
141
144
|
|
|
142
145
|
Raises:
|
|
143
146
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
@@ -166,7 +169,8 @@ async def asyncio(
|
|
|
166
169
|
List all templates
|
|
167
170
|
|
|
168
171
|
Args:
|
|
169
|
-
team_id (Union[Unset, str]): Identifier of the team
|
|
172
|
+
team_id (Union[Unset, str]): Identifier of the team, as its UUID or its public project ID
|
|
173
|
+
(prj_)
|
|
170
174
|
|
|
171
175
|
Raises:
|
|
172
176
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
@@ -96,7 +96,8 @@ def sync_detailed(
|
|
|
96
96
|
List all templates
|
|
97
97
|
|
|
98
98
|
Args:
|
|
99
|
-
team_id (Union[Unset, str]): Identifier of the team
|
|
99
|
+
team_id (Union[Unset, str]): Identifier of the team, as its UUID or its public project ID
|
|
100
|
+
(prj_)
|
|
100
101
|
next_token (Union[Unset, str]):
|
|
101
102
|
limit (Union[Unset, int]): Default: 100.
|
|
102
103
|
|
|
@@ -133,7 +134,8 @@ def sync(
|
|
|
133
134
|
List all templates
|
|
134
135
|
|
|
135
136
|
Args:
|
|
136
|
-
team_id (Union[Unset, str]): Identifier of the team
|
|
137
|
+
team_id (Union[Unset, str]): Identifier of the team, as its UUID or its public project ID
|
|
138
|
+
(prj_)
|
|
137
139
|
next_token (Union[Unset, str]):
|
|
138
140
|
limit (Union[Unset, int]): Default: 100.
|
|
139
141
|
|
|
@@ -165,7 +167,8 @@ async def asyncio_detailed(
|
|
|
165
167
|
List all templates
|
|
166
168
|
|
|
167
169
|
Args:
|
|
168
|
-
team_id (Union[Unset, str]): Identifier of the team
|
|
170
|
+
team_id (Union[Unset, str]): Identifier of the team, as its UUID or its public project ID
|
|
171
|
+
(prj_)
|
|
169
172
|
next_token (Union[Unset, str]):
|
|
170
173
|
limit (Union[Unset, int]): Default: 100.
|
|
171
174
|
|
|
@@ -200,7 +203,8 @@ async def asyncio(
|
|
|
200
203
|
List all templates
|
|
201
204
|
|
|
202
205
|
Args:
|
|
203
|
-
team_id (Union[Unset, str]): Identifier of the team
|
|
206
|
+
team_id (Union[Unset, str]): Identifier of the team, as its UUID or its public project ID
|
|
207
|
+
(prj_)
|
|
204
208
|
next_token (Union[Unset, str]):
|
|
205
209
|
limit (Union[Unset, int]): Default: 100.
|
|
206
210
|
|
|
@@ -17,7 +17,7 @@ class Error:
|
|
|
17
17
|
message (str): Error
|
|
18
18
|
error_code (Union[Unset, str]): Machine-readable semantic error code. Not a closed set; initial values:
|
|
19
19
|
sandbox_capacity_unavailable, sandbox_placement_timeout, sandbox_no_compatible_node, sandbox_create_failed,
|
|
20
|
-
internal_server_error.
|
|
20
|
+
internal_server_error, secret_limit_reached.
|
|
21
21
|
"""
|
|
22
22
|
|
|
23
23
|
code: int
|
|
@@ -15,19 +15,28 @@ class SandboxSnapshotRequest:
|
|
|
15
15
|
Attributes:
|
|
16
16
|
name (Union[Unset, str]): Optional name for the snapshot template. If a snapshot template with this name already
|
|
17
17
|
exists, a new build will be assigned to the existing template instead of creating a new one.
|
|
18
|
+
memory (Union[Unset, bool]): Whether to capture a full memory snapshot. When false, only the filesystem is
|
|
19
|
+
persisted: the snapshot is smaller and faster to take, and sandboxes created from it cold-boot (start fresh from
|
|
20
|
+
disk) instead of restoring memory, so they begin without the source sandbox's running processes, in-memory
|
|
21
|
+
state, and open connections. The source sandbox keeps running in both cases. Defaults to true.
|
|
18
22
|
"""
|
|
19
23
|
|
|
20
24
|
name: Union[Unset, str] = UNSET
|
|
25
|
+
memory: Union[Unset, bool] = UNSET
|
|
21
26
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
22
27
|
|
|
23
28
|
def to_dict(self) -> dict[str, Any]:
|
|
24
29
|
name = self.name
|
|
25
30
|
|
|
31
|
+
memory = self.memory
|
|
32
|
+
|
|
26
33
|
field_dict: dict[str, Any] = {}
|
|
27
34
|
field_dict.update(self.additional_properties)
|
|
28
35
|
field_dict.update({})
|
|
29
36
|
if name is not UNSET:
|
|
30
37
|
field_dict["name"] = name
|
|
38
|
+
if memory is not UNSET:
|
|
39
|
+
field_dict["memory"] = memory
|
|
31
40
|
|
|
32
41
|
return field_dict
|
|
33
42
|
|
|
@@ -36,8 +45,11 @@ class SandboxSnapshotRequest:
|
|
|
36
45
|
d = dict(src_dict)
|
|
37
46
|
name = d.pop("name", UNSET)
|
|
38
47
|
|
|
48
|
+
memory = d.pop("memory", UNSET)
|
|
49
|
+
|
|
39
50
|
sandbox_snapshot_request = cls(
|
|
40
51
|
name=name,
|
|
52
|
+
memory=memory,
|
|
41
53
|
)
|
|
42
54
|
|
|
43
55
|
sandbox_snapshot_request.additional_properties = d
|
|
@@ -17,7 +17,7 @@ class TemplateBuildRequestV3:
|
|
|
17
17
|
"my-template:v1"). If tag is included, it will be treated as if the tag was provided in the tags array.
|
|
18
18
|
tags (Union[Unset, list[str]]): Tags to assign to the template build
|
|
19
19
|
alias (Union[Unset, str]): Alias of the template. Deprecated, use name instead.
|
|
20
|
-
team_id (Union[Unset, str]): Identifier of the team
|
|
20
|
+
team_id (Union[Unset, str]): Identifier of the team, as its UUID or its public project ID (prj_)
|
|
21
21
|
cpu_count (Union[Unset, int]): CPU cores for the sandbox
|
|
22
22
|
memory_mb (Union[Unset, int]): Memory for the sandbox in MiB
|
|
23
23
|
min_free_disk_mb (Union[Unset, int]): Requested minimum free space after the template's build steps, in MiB.
|
|
@@ -237,7 +237,7 @@ class StatResponse(Message[_StatResponseFields]):
|
|
|
237
237
|
|
|
238
238
|
entry: EntryInfo | None
|
|
239
239
|
|
|
240
|
-
_EntryInfoFields: TypeAlias = Literal["name", "type", "path", "size", "mode", "permissions", "owner", "group", "modified_time", "symlink_target", "metadata"]
|
|
240
|
+
_EntryInfoFields: TypeAlias = Literal["name", "type", "path", "size", "mode", "permissions", "owner", "group", "modified_time", "symlink_target", "metadata", "is_symlink"]
|
|
241
241
|
|
|
242
242
|
class EntryInfo(Message[_EntryInfoFields]):
|
|
243
243
|
"""
|
|
@@ -296,9 +296,15 @@ class EntryInfo(Message[_EntryInfoFields]):
|
|
|
296
296
|
```proto
|
|
297
297
|
map<string, string> metadata = 11;
|
|
298
298
|
```
|
|
299
|
+
is_symlink:
|
|
300
|
+
True when the entry itself is a symlink; type then describes the symlink's target.
|
|
301
|
+
|
|
302
|
+
```proto
|
|
303
|
+
bool is_symlink = 12;
|
|
304
|
+
```
|
|
299
305
|
"""
|
|
300
306
|
|
|
301
|
-
__slots__ = ("name", "type", "path", "size", "mode", "permissions", "owner", "group", "modified_time", "symlink_target", "metadata")
|
|
307
|
+
__slots__ = ("name", "type", "path", "size", "mode", "permissions", "owner", "group", "modified_time", "symlink_target", "metadata", "is_symlink")
|
|
302
308
|
|
|
303
309
|
if TYPE_CHECKING:
|
|
304
310
|
|
|
@@ -316,6 +322,7 @@ class EntryInfo(Message[_EntryInfoFields]):
|
|
|
316
322
|
modified_time: Timestamp | None = None,
|
|
317
323
|
symlink_target: str | None = None,
|
|
318
324
|
metadata: dict[str, str] | None = None,
|
|
325
|
+
is_symlink: bool = False,
|
|
319
326
|
) -> None:
|
|
320
327
|
pass
|
|
321
328
|
|
|
@@ -330,6 +337,7 @@ class EntryInfo(Message[_EntryInfoFields]):
|
|
|
330
337
|
modified_time: Timestamp | None
|
|
331
338
|
symlink_target: str
|
|
332
339
|
metadata: dict[str, str]
|
|
340
|
+
is_symlink: bool
|
|
333
341
|
|
|
334
342
|
_ListDirRequestFields: TypeAlias = Literal["path", "depth"]
|
|
335
343
|
|
|
@@ -805,7 +813,7 @@ class EventType(Enum):
|
|
|
805
813
|
|
|
806
814
|
|
|
807
815
|
_DESC = file_desc(
|
|
808
|
-
b'\n\x1bfilesystem/filesystem.proto\x12\nfilesystem\x1a\x1fgoogle/protobuf/timestamp.proto"G\n\x0bMoveRequest\x12\x16\n\x06source\x18\x01 \x01(\tR\x06source\x12 \n\x0bdestination\x18\x02 \x01(\tR\x0bdestination";\n\x0cMoveResponse\x12+\n\x05entry\x18\x01 \x01(\x0b2\x15.filesystem.EntryInfoR\x05entry"$\n\x0eMakeDirRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path">\n\x0fMakeDirResponse\x12+\n\x05entry\x18\x01 \x01(\x0b2\x15.filesystem.EntryInfoR\x05entry"#\n\rRemoveRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path"\x10\n\x0eRemoveResponse"!\n\x0bStatRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path";\n\x0cStatResponse\x12+\n\x05entry\x18\x01 \x01(\x0b2\x15.filesystem.EntryInfoR\x05entry"\
|
|
816
|
+
b'\n\x1bfilesystem/filesystem.proto\x12\nfilesystem\x1a\x1fgoogle/protobuf/timestamp.proto"G\n\x0bMoveRequest\x12\x16\n\x06source\x18\x01 \x01(\tR\x06source\x12 \n\x0bdestination\x18\x02 \x01(\tR\x0bdestination";\n\x0cMoveResponse\x12+\n\x05entry\x18\x01 \x01(\x0b2\x15.filesystem.EntryInfoR\x05entry"$\n\x0eMakeDirRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path">\n\x0fMakeDirResponse\x12+\n\x05entry\x18\x01 \x01(\x0b2\x15.filesystem.EntryInfoR\x05entry"#\n\rRemoveRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path"\x10\n\x0eRemoveResponse"!\n\x0bStatRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path";\n\x0cStatResponse\x12+\n\x05entry\x18\x01 \x01(\x0b2\x15.filesystem.EntryInfoR\x05entry"\xf0\x03\n\tEntryInfo\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12(\n\x04type\x18\x02 \x01(\x0e2\x14.filesystem.FileTypeR\x04type\x12\x12\n\x04path\x18\x03 \x01(\tR\x04path\x12\x12\n\x04size\x18\x04 \x01(\x03R\x04size\x12\x12\n\x04mode\x18\x05 \x01(\rR\x04mode\x12 \n\x0bpermissions\x18\x06 \x01(\tR\x0bpermissions\x12\x14\n\x05owner\x18\x07 \x01(\tR\x05owner\x12\x14\n\x05group\x18\x08 \x01(\tR\x05group\x12?\n\rmodified_time\x18\t \x01(\x0b2\x1a.google.protobuf.TimestampR\x0cmodifiedTime\x12*\n\x0esymlink_target\x18\n \x01(\tH\x00R\rsymlinkTarget\x88\x01\x01\x12?\n\x08metadata\x18\x0b \x03(\x0b2#.filesystem.EntryInfo.MetadataEntryR\x08metadata\x12\x1d\n\nis_symlink\x18\x0c \x01(\x08R\tisSymlink\x1a;\n\rMetadataEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x028\x01B\x11\n\x0f_symlink_target":\n\x0eListDirRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\x12\x14\n\x05depth\x18\x02 \x01(\rR\x05depth"B\n\x0fListDirResponse\x12/\n\x07entries\x18\x01 \x03(\x0b2\x15.filesystem.EntryInfoR\x07entries"\x9a\x01\n\x0fWatchDirRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\x12\x1c\n\trecursive\x18\x02 \x01(\x08R\trecursive\x12#\n\rinclude_entry\x18\x03 \x01(\x08R\x0cincludeEntry\x120\n\x14allow_network_mounts\x18\x04 \x01(\x08R\x12allowNetworkMounts"\x8c\x01\n\x0fFilesystemEvent\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12)\n\x04type\x18\x02 \x01(\x0e2\x15.filesystem.EventTypeR\x04type\x120\n\x05entry\x18\x03 \x01(\x0b2\x15.filesystem.EntryInfoH\x00R\x05entry\x88\x01\x01B\x08\n\x06_entry"\xfe\x01\n\x10WatchDirResponse\x12?\n\x05start\x18\x01 \x01(\x0b2\'.filesystem.WatchDirResponse.StartEventH\x00R\x05start\x12=\n\nfilesystem\x18\x02 \x01(\x0b2\x1b.filesystem.FilesystemEventH\x00R\nfilesystem\x12F\n\tkeepalive\x18\x03 \x01(\x0b2&.filesystem.WatchDirResponse.KeepAliveH\x00R\tkeepalive\x1a\x0c\n\nStartEvent\x1a\x0b\n\tKeepAliveB\x07\n\x05event"\x9f\x01\n\x14CreateWatcherRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\x12\x1c\n\trecursive\x18\x02 \x01(\x08R\trecursive\x12#\n\rinclude_entry\x18\x03 \x01(\x08R\x0cincludeEntry\x120\n\x14allow_network_mounts\x18\x04 \x01(\x08R\x12allowNetworkMounts"6\n\x15CreateWatcherResponse\x12\x1d\n\nwatcher_id\x18\x01 \x01(\tR\twatcherId"8\n\x17GetWatcherEventsRequest\x12\x1d\n\nwatcher_id\x18\x01 \x01(\tR\twatcherId"O\n\x18GetWatcherEventsResponse\x123\n\x06events\x18\x01 \x03(\x0b2\x1b.filesystem.FilesystemEventR\x06events"5\n\x14RemoveWatcherRequest\x12\x1d\n\nwatcher_id\x18\x01 \x01(\tR\twatcherId"\x17\n\x15RemoveWatcherResponse*i\n\x08FileType\x12\x19\n\x15FILE_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0eFILE_TYPE_FILE\x10\x01\x12\x17\n\x13FILE_TYPE_DIRECTORY\x10\x02\x12\x15\n\x11FILE_TYPE_SYMLINK\x10\x03*\x98\x01\n\tEventType\x12\x1a\n\x16EVENT_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11EVENT_TYPE_CREATE\x10\x01\x12\x14\n\x10EVENT_TYPE_WRITE\x10\x02\x12\x15\n\x11EVENT_TYPE_REMOVE\x10\x03\x12\x15\n\x11EVENT_TYPE_RENAME\x10\x04\x12\x14\n\x10EVENT_TYPE_CHMOD\x10\x052\x9f\x05\n\nFilesystem\x129\n\x04Stat\x12\x17.filesystem.StatRequest\x1a\x18.filesystem.StatResponse\x12B\n\x07MakeDir\x12\x1a.filesystem.MakeDirRequest\x1a\x1b.filesystem.MakeDirResponse\x129\n\x04Move\x12\x17.filesystem.MoveRequest\x1a\x18.filesystem.MoveResponse\x12B\n\x07ListDir\x12\x1a.filesystem.ListDirRequest\x1a\x1b.filesystem.ListDirResponse\x12?\n\x06Remove\x12\x19.filesystem.RemoveRequest\x1a\x1a.filesystem.RemoveResponse\x12G\n\x08WatchDir\x12\x1b.filesystem.WatchDirRequest\x1a\x1c.filesystem.WatchDirResponse0\x01\x12T\n\rCreateWatcher\x12 .filesystem.CreateWatcherRequest\x1a!.filesystem.CreateWatcherResponse\x12]\n\x10GetWatcherEvents\x12#.filesystem.GetWatcherEventsRequest\x1a$.filesystem.GetWatcherEventsResponse\x12T\n\rRemoveWatcher\x12 .filesystem.RemoveWatcherRequest\x1a!.filesystem.RemoveWatcherResponseBi\n\x0ecom.filesystemB\x0fFilesystemProtoP\x01\xa2\x02\x03FXX\xaa\x02\nFilesystem\xca\x02\nFilesystem\xe2\x02\x16Filesystem\\GPBMetadata\xea\x02\nFilesystemb\x06proto3',
|
|
809
817
|
[
|
|
810
818
|
timestamp_pb.desc(),
|
|
811
819
|
],
|
|
@@ -130,7 +130,9 @@ class EntryInfo(WriteInfo):
|
|
|
130
130
|
def map_entry_info(entry: filesystem_pb.EntryInfo) -> EntryInfo:
|
|
131
131
|
return EntryInfo(
|
|
132
132
|
name=entry.name,
|
|
133
|
-
type
|
|
133
|
+
# Newer envd reports a symlink's target type in `type` and marks the
|
|
134
|
+
# link itself with `is_symlink`; older envd reports SYMLINK in `type`.
|
|
135
|
+
type=FileType.SYMLINK if entry.is_symlink else map_file_type(entry.type),
|
|
134
136
|
path=entry.path,
|
|
135
137
|
size=entry.size,
|
|
136
138
|
mode=entry.mode,
|
|
@@ -535,29 +535,73 @@ class SandboxNetworkInfo(TypedDict, total=False):
|
|
|
535
535
|
https_ports: List[int]
|
|
536
536
|
|
|
537
537
|
|
|
538
|
+
SnapshotMode = Literal["full", "filesystem"]
|
|
539
|
+
"""
|
|
540
|
+
What a pause or snapshot persists.
|
|
541
|
+
|
|
542
|
+
``"full"`` persists the filesystem and the memory (running processes, in-memory
|
|
543
|
+
state and open connections); resuming restores the sandbox exactly where it left
|
|
544
|
+
off. ``"filesystem"`` persists only the filesystem: smaller and faster to take,
|
|
545
|
+
and resuming (or creating a sandbox from the snapshot) cold-boots it from disk,
|
|
546
|
+
without the running processes, in-memory state and open connections.
|
|
547
|
+
"""
|
|
548
|
+
|
|
549
|
+
|
|
550
|
+
def resolve_snapshot_memory(
|
|
551
|
+
field: str,
|
|
552
|
+
mode: Optional[SnapshotMode],
|
|
553
|
+
keep_memory: Optional[bool] = None,
|
|
554
|
+
) -> Union[Unset, bool]:
|
|
555
|
+
"""Resolve ``mode`` (or the deprecated ``keep_memory``) into the API's
|
|
556
|
+
``memory`` flag.
|
|
557
|
+
|
|
558
|
+
Unset, it stays ``UNSET`` so the API default (currently a full snapshot)
|
|
559
|
+
applies. ``field`` names the option in error messages.
|
|
560
|
+
"""
|
|
561
|
+
if mode is not None and keep_memory is not None:
|
|
562
|
+
raise InvalidArgumentException(
|
|
563
|
+
f"Pass either {field} or the deprecated keep_memory, not both."
|
|
564
|
+
)
|
|
565
|
+
if mode is None:
|
|
566
|
+
return keep_memory if keep_memory is not None else UNSET
|
|
567
|
+
# Re-check at runtime for callers that bypass the type.
|
|
568
|
+
allowed = ("full", "filesystem")
|
|
569
|
+
if mode not in allowed:
|
|
570
|
+
raise InvalidArgumentException(
|
|
571
|
+
f"{field} must be one of: {', '.join(allowed)} (got {mode!r})."
|
|
572
|
+
)
|
|
573
|
+
return mode == "full"
|
|
574
|
+
|
|
575
|
+
|
|
538
576
|
class SandboxOnTimeoutPause(TypedDict):
|
|
539
577
|
"""
|
|
540
578
|
Object form of `on_timeout` that auto-pauses the sandbox when the timeout is
|
|
541
|
-
reached, optionally controlling the pause snapshot kind via `
|
|
579
|
+
reached, optionally controlling the pause snapshot kind via `mode`.
|
|
542
580
|
"""
|
|
543
581
|
|
|
544
582
|
action: Literal["pause"]
|
|
545
583
|
"""Auto-pause the sandbox when the timeout is reached."""
|
|
546
584
|
|
|
547
|
-
|
|
585
|
+
mode: NotRequired[SnapshotMode]
|
|
548
586
|
"""
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
connections.
|
|
587
|
+
What the timeout auto-pause persists. Left unset, it is omitted from the
|
|
588
|
+
create request and the API's own default (currently `"full"`) applies. With
|
|
589
|
+
`"filesystem"`, the auto-pause drops the in-memory state and persists only
|
|
590
|
+
the filesystem; resuming such a sandbox cold-boots (reboots) it from disk,
|
|
591
|
+
losing running processes and open connections.
|
|
555
592
|
|
|
556
|
-
|
|
557
|
-
inbound traffic by restoring its memory snapshot in place,
|
|
558
|
-
woke it hits an already-running process. A
|
|
559
|
-
memory to restore — resuming cold-boots it —
|
|
560
|
-
by traffic and must be resumed explicitly
|
|
593
|
+
`"filesystem"` cannot be combined with `auto_resume`: auto-resume wakes a
|
|
594
|
+
paused sandbox on inbound traffic by restoring its memory snapshot in place,
|
|
595
|
+
so the request that woke it hits an already-running process. A
|
|
596
|
+
filesystem-only snapshot has no memory to restore — resuming cold-boots it —
|
|
597
|
+
so it can't be woken transparently by traffic and must be resumed explicitly
|
|
598
|
+
via `connect()`.
|
|
599
|
+
"""
|
|
600
|
+
|
|
601
|
+
keep_memory: NotRequired[bool]
|
|
602
|
+
"""
|
|
603
|
+
:deprecated: Use `mode` instead: `keep_memory: False` is
|
|
604
|
+
`mode: "filesystem"`, `keep_memory: True` is `mode: "full"`.
|
|
561
605
|
"""
|
|
562
606
|
|
|
563
607
|
|
|
@@ -576,9 +620,8 @@ SandboxOnTimeout = Union[
|
|
|
576
620
|
"""
|
|
577
621
|
What should happen to the sandbox when the timeout is reached. Either the bare
|
|
578
622
|
action (`"pause"` / `"kill"`) or the object form. The object form is a
|
|
579
|
-
discriminated union on `action`: `
|
|
580
|
-
`action: "pause"`. Passing `
|
|
581
|
-
error.
|
|
623
|
+
discriminated union on `action`: `mode` is only accepted alongside
|
|
624
|
+
`action: "pause"`. Passing `mode` with `action: "kill"` is a static type error.
|
|
582
625
|
"""
|
|
583
626
|
|
|
584
627
|
|
|
@@ -593,7 +636,7 @@ class SandboxLifecycle(TypedDict):
|
|
|
593
636
|
"""
|
|
594
637
|
What should happen to the sandbox when timeout is reached. `"kill"` terminates
|
|
595
638
|
the sandbox; `"pause"` pauses it for later resume. Accepts either the bare
|
|
596
|
-
action or an object `{"action": "pause", "
|
|
639
|
+
action or an object `{"action": "pause", "mode": ...}` /
|
|
597
640
|
`{"action": "kill"}` to also control the pause snapshot kind. A value outside
|
|
598
641
|
the two actions raises `InvalidArgumentException`. Omitted from the
|
|
599
642
|
create request when unset, leaving the API's default (currently `"kill"`) in
|
|
@@ -605,8 +648,8 @@ class SandboxLifecycle(TypedDict):
|
|
|
605
648
|
Whether activity should cause the sandbox to resume when paused. Leave unset
|
|
606
649
|
to let the API pick the behavior. Set `False` to opt out explicitly and keep
|
|
607
650
|
auto-resume off even if the API's default changes. Can be `True` only when
|
|
608
|
-
`on_timeout` is `pause`. Not supported
|
|
609
|
-
|
|
651
|
+
`on_timeout` is `pause`. Not supported with `mode: "filesystem"` (a
|
|
652
|
+
filesystem-only snapshot must be resumed explicitly via `connect()`).
|
|
610
653
|
"""
|
|
611
654
|
|
|
612
655
|
|
|
@@ -901,25 +944,23 @@ def build_lifecycle_config(
|
|
|
901
944
|
``auto_pause`` is left unset when no ``on_timeout`` was configured: sending
|
|
902
945
|
``False`` would be indistinguishable from an explicit ``"kill"`` and would
|
|
903
946
|
override the default the API owns. ``auto_pause_memory`` is likewise left
|
|
904
|
-
unset unless the caller chose ``
|
|
947
|
+
unset unless the caller chose ``mode``.
|
|
905
948
|
"""
|
|
906
|
-
# on_timeout accepts a bare action or {"action", "
|
|
907
|
-
# Only the object form carries keep_memory.
|
|
949
|
+
# on_timeout accepts a bare action or {"action", "mode"}; normalize.
|
|
950
|
+
# Only the object form carries mode (or the deprecated keep_memory).
|
|
908
951
|
on_timeout_raw = lifecycle.get("on_timeout") if lifecycle else None
|
|
909
952
|
# A missing on_timeout — or an explicit None from an untyped caller — is not
|
|
910
953
|
# a choice of kill. It only resolves to kill semantics locally, for the
|
|
911
|
-
# validation below
|
|
954
|
+
# validation below.
|
|
912
955
|
on_timeout_configured = on_timeout_raw is not None
|
|
913
956
|
if isinstance(on_timeout_raw, dict):
|
|
914
957
|
on_timeout = on_timeout_raw.get("action")
|
|
915
|
-
|
|
916
|
-
keep_memory = on_timeout_raw.get("keep_memory")
|
|
958
|
+
pause_opts = cast(Dict[str, Any], on_timeout_raw)
|
|
917
959
|
else:
|
|
918
960
|
# Only fall back when unconfigured, not on other falsy-but-present
|
|
919
961
|
# values an untyped caller might pass.
|
|
920
962
|
on_timeout = on_timeout_raw if on_timeout_configured else "kill"
|
|
921
|
-
|
|
922
|
-
keep_memory_provided = False
|
|
963
|
+
pause_opts = {}
|
|
923
964
|
|
|
924
965
|
allowed_actions = ("pause", "kill")
|
|
925
966
|
if on_timeout_configured and on_timeout not in allowed_actions:
|
|
@@ -935,19 +976,15 @@ def build_lifecycle_config(
|
|
|
935
976
|
# auto_pause — so an unrecognized value cannot be rejected server-side, and
|
|
936
977
|
# resolving it to kill would delete the sandbox a caller asked to preserve.
|
|
937
978
|
|
|
938
|
-
#
|
|
939
|
-
#
|
|
940
|
-
|
|
941
|
-
if keep_memory_provided and on_timeout != "pause":
|
|
979
|
+
# mode only governs a pause action. The discriminated union type forbids it
|
|
980
|
+
# on action="kill"; re-check at runtime for callers that bypass the type.
|
|
981
|
+
if ("mode" in pause_opts or "keep_memory" in pause_opts) and on_timeout != "pause":
|
|
942
982
|
raise InvalidArgumentException(
|
|
943
|
-
"
|
|
983
|
+
"mode is only allowed when on_timeout action is 'pause'."
|
|
944
984
|
)
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
# actually provided.
|
|
949
|
-
if keep_memory is None:
|
|
950
|
-
keep_memory = True
|
|
985
|
+
memory = resolve_snapshot_memory(
|
|
986
|
+
'on_timeout["mode"]', pause_opts.get("mode"), pause_opts.get("keep_memory")
|
|
987
|
+
)
|
|
951
988
|
auto_resume = lifecycle.get("auto_resume") if lifecycle else None
|
|
952
989
|
|
|
953
990
|
if auto_resume and on_timeout != "pause":
|
|
@@ -955,18 +992,16 @@ def build_lifecycle_config(
|
|
|
955
992
|
"auto_resume can only be True when on_timeout action is 'pause'."
|
|
956
993
|
)
|
|
957
994
|
|
|
958
|
-
if
|
|
995
|
+
if memory is False and auto_resume:
|
|
959
996
|
raise InvalidArgumentException(
|
|
960
|
-
"auto_resume: True is not a valid value
|
|
997
|
+
"auto_resume: True is not a valid value with mode: 'filesystem' - "
|
|
961
998
|
"a filesystem-only snapshot cannot be auto-resumed by traffic and "
|
|
962
999
|
"must be resumed explicitly using Sandbox.connect()."
|
|
963
1000
|
)
|
|
964
1001
|
|
|
965
1002
|
return SandboxLifecycleBody(
|
|
966
1003
|
auto_pause=(on_timeout == "pause") if on_timeout_configured else UNSET,
|
|
967
|
-
auto_pause_memory=
|
|
968
|
-
keep_memory if on_timeout == "pause" and keep_memory_provided else UNSET
|
|
969
|
-
),
|
|
1004
|
+
auto_pause_memory=memory if on_timeout == "pause" else UNSET,
|
|
970
1005
|
auto_resume=(
|
|
971
1006
|
ClientSandboxAutoResumeConfig(enabled=auto_resume)
|
|
972
1007
|
if auto_resume is not None
|
|
@@ -156,17 +156,17 @@ class AsyncCommandHandle:
|
|
|
156
156
|
match oneof:
|
|
157
157
|
case Oneof(field="data", value=data):
|
|
158
158
|
match data.output:
|
|
159
|
-
case Oneof(field="stdout", value=chunk)
|
|
159
|
+
case Oneof(field="stdout", value=chunk):
|
|
160
160
|
out = self._stdout_decoder.decode(chunk)
|
|
161
161
|
if out:
|
|
162
162
|
self._stdout_chunks.append(out)
|
|
163
163
|
yield out, None, None
|
|
164
|
-
case Oneof(field="stderr", value=chunk)
|
|
164
|
+
case Oneof(field="stderr", value=chunk):
|
|
165
165
|
out = self._stderr_decoder.decode(chunk)
|
|
166
166
|
if out:
|
|
167
167
|
self._stderr_chunks.append(out)
|
|
168
168
|
yield None, out, None
|
|
169
|
-
case Oneof(field="pty", value=chunk)
|
|
169
|
+
case Oneof(field="pty", value=chunk):
|
|
170
170
|
yield None, None, chunk
|
|
171
171
|
case Oneof(field="end", value=end):
|
|
172
172
|
# Flush trailing decoder bytes into the accumulators and
|