agent-sandbox-client 0.3.1a1__py3-none-any.whl
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.
- agent_sandbox/__init__.py +508 -0
- agent_sandbox/_provider_schema.py +57 -0
- agent_sandbox/_standard/LICENSE +9 -0
- agent_sandbox/_standard/PATCHES.md +23 -0
- agent_sandbox/_standard/SOURCES.json +960 -0
- agent_sandbox/_standard/__init__.py +260 -0
- agent_sandbox/_standard/api/__init__.py +287 -0
- agent_sandbox/_standard/api/client/__init__.py +8 -0
- agent_sandbox/_standard/api/client/api/__init__.py +1 -0
- agent_sandbox/_standard/api/client/api/sandboxes/__init__.py +1 -0
- agent_sandbox/_standard/api/client/api/sandboxes/delete_sandboxes_sandbox_id.py +161 -0
- agent_sandbox/_standard/api/client/api/sandboxes/get_sandboxes.py +176 -0
- agent_sandbox/_standard/api/client/api/sandboxes/get_sandboxes_metrics.py +173 -0
- agent_sandbox/_standard/api/client/api/sandboxes/get_sandboxes_sandbox_id.py +163 -0
- agent_sandbox/_standard/api/client/api/sandboxes/get_sandboxes_sandbox_id_logs.py +199 -0
- agent_sandbox/_standard/api/client/api/sandboxes/get_sandboxes_sandbox_id_metrics.py +212 -0
- agent_sandbox/_standard/api/client/api/sandboxes/get_v2_sandboxes.py +230 -0
- agent_sandbox/_standard/api/client/api/sandboxes/get_v_2_sandboxes_sandbox_id_logs.py +254 -0
- agent_sandbox/_standard/api/client/api/sandboxes/post_sandboxes.py +172 -0
- agent_sandbox/_standard/api/client/api/sandboxes/post_sandboxes_sandbox_id_connect.py +193 -0
- agent_sandbox/_standard/api/client/api/sandboxes/post_sandboxes_sandbox_id_pause.py +187 -0
- agent_sandbox/_standard/api/client/api/sandboxes/post_sandboxes_sandbox_id_refreshes.py +181 -0
- agent_sandbox/_standard/api/client/api/sandboxes/post_sandboxes_sandbox_id_resume.py +189 -0
- agent_sandbox/_standard/api/client/api/sandboxes/post_sandboxes_sandbox_id_snapshots.py +195 -0
- agent_sandbox/_standard/api/client/api/sandboxes/post_sandboxes_sandbox_id_timeout.py +193 -0
- agent_sandbox/_standard/api/client/api/sandboxes/put_sandboxes_sandbox_id_network.py +199 -0
- agent_sandbox/_standard/api/client/api/snapshots/__init__.py +1 -0
- agent_sandbox/_standard/api/client/api/snapshots/get_snapshots.py +212 -0
- agent_sandbox/_standard/api/client/api/tags/__init__.py +1 -0
- agent_sandbox/_standard/api/client/api/tags/delete_templates_tags.py +174 -0
- agent_sandbox/_standard/api/client/api/tags/get_templates_template_id_tags.py +172 -0
- agent_sandbox/_standard/api/client/api/tags/post_templates_tags.py +176 -0
- agent_sandbox/_standard/api/client/api/templates/__init__.py +1 -0
- agent_sandbox/_standard/api/client/api/templates/delete_templates_template_id.py +158 -0
- agent_sandbox/_standard/api/client/api/templates/get_templates.py +172 -0
- agent_sandbox/_standard/api/client/api/templates/get_templates_aliases_alias.py +167 -0
- agent_sandbox/_standard/api/client/api/templates/get_templates_template_id.py +195 -0
- agent_sandbox/_standard/api/client/api/templates/get_templates_template_id_builds_build_id_logs.py +272 -0
- agent_sandbox/_standard/api/client/api/templates/get_templates_template_id_builds_build_id_status.py +232 -0
- agent_sandbox/_standard/api/client/api/templates/get_templates_template_id_files_hash.py +180 -0
- agent_sandbox/_standard/api/client/api/templates/patch_templates_template_id.py +183 -0
- agent_sandbox/_standard/api/client/api/templates/patch_v_2_templates_template_id.py +185 -0
- agent_sandbox/_standard/api/client/api/templates/post_templates.py +172 -0
- agent_sandbox/_standard/api/client/api/templates/post_templates_template_id.py +181 -0
- agent_sandbox/_standard/api/client/api/templates/post_templates_template_id_builds_build_id.py +170 -0
- agent_sandbox/_standard/api/client/api/templates/post_v2_templates.py +172 -0
- agent_sandbox/_standard/api/client/api/templates/post_v3_templates.py +176 -0
- agent_sandbox/_standard/api/client/api/templates/post_v_2_templates_template_id_builds_build_id.py +192 -0
- agent_sandbox/_standard/api/client/api/volumes/__init__.py +1 -0
- agent_sandbox/_standard/api/client/api/volumes/delete_volumes_volume_id.py +161 -0
- agent_sandbox/_standard/api/client/api/volumes/get_volumes.py +140 -0
- agent_sandbox/_standard/api/client/api/volumes/get_volumes_volume_id.py +163 -0
- agent_sandbox/_standard/api/client/api/volumes/post_volumes.py +172 -0
- agent_sandbox/_standard/api/client/client.py +286 -0
- agent_sandbox/_standard/api/client/errors.py +16 -0
- agent_sandbox/_standard/api/client/models/__init__.py +185 -0
- agent_sandbox/_standard/api/client/models/admin_build_cancel_result.py +67 -0
- agent_sandbox/_standard/api/client/models/admin_sandbox_kill_result.py +67 -0
- agent_sandbox/_standard/api/client/models/assign_template_tags_request.py +67 -0
- agent_sandbox/_standard/api/client/models/assigned_template_tags.py +68 -0
- agent_sandbox/_standard/api/client/models/aws_registry.py +85 -0
- agent_sandbox/_standard/api/client/models/aws_registry_type.py +8 -0
- agent_sandbox/_standard/api/client/models/build_log_entry.py +89 -0
- agent_sandbox/_standard/api/client/models/build_status_reason.py +95 -0
- agent_sandbox/_standard/api/client/models/connect_sandbox.py +59 -0
- agent_sandbox/_standard/api/client/models/created_access_token.py +100 -0
- agent_sandbox/_standard/api/client/models/created_team_api_key.py +166 -0
- agent_sandbox/_standard/api/client/models/delete_template_tags_request.py +67 -0
- agent_sandbox/_standard/api/client/models/disk_metrics.py +91 -0
- agent_sandbox/_standard/api/client/models/error.py +67 -0
- agent_sandbox/_standard/api/client/models/gcp_registry.py +69 -0
- agent_sandbox/_standard/api/client/models/gcp_registry_type.py +8 -0
- agent_sandbox/_standard/api/client/models/general_registry.py +77 -0
- agent_sandbox/_standard/api/client/models/general_registry_type.py +8 -0
- agent_sandbox/_standard/api/client/models/identifier_masking_details.py +83 -0
- agent_sandbox/_standard/api/client/models/listed_sandbox.py +179 -0
- agent_sandbox/_standard/api/client/models/log_level.py +11 -0
- agent_sandbox/_standard/api/client/models/logs_direction.py +9 -0
- agent_sandbox/_standard/api/client/models/logs_source.py +9 -0
- agent_sandbox/_standard/api/client/models/machine_info.py +83 -0
- agent_sandbox/_standard/api/client/models/max_team_metric.py +78 -0
- agent_sandbox/_standard/api/client/models/mcp_type_0.py +44 -0
- agent_sandbox/_standard/api/client/models/new_access_token.py +59 -0
- agent_sandbox/_standard/api/client/models/new_sandbox.py +224 -0
- agent_sandbox/_standard/api/client/models/new_team_api_key.py +59 -0
- agent_sandbox/_standard/api/client/models/new_volume.py +59 -0
- agent_sandbox/_standard/api/client/models/node.py +160 -0
- agent_sandbox/_standard/api/client/models/node_detail.py +160 -0
- agent_sandbox/_standard/api/client/models/node_metrics.py +122 -0
- agent_sandbox/_standard/api/client/models/node_status.py +12 -0
- agent_sandbox/_standard/api/client/models/node_status_change.py +82 -0
- agent_sandbox/_standard/api/client/models/post_sandboxes_sandbox_id_refreshes_body.py +59 -0
- agent_sandbox/_standard/api/client/models/post_sandboxes_sandbox_id_snapshots_body.py +60 -0
- agent_sandbox/_standard/api/client/models/post_sandboxes_sandbox_id_timeout_body.py +59 -0
- agent_sandbox/_standard/api/client/models/resumed_sandbox.py +68 -0
- agent_sandbox/_standard/api/client/models/sandbox.py +145 -0
- agent_sandbox/_standard/api/client/models/sandbox_auto_resume_config.py +60 -0
- agent_sandbox/_standard/api/client/models/sandbox_detail.py +267 -0
- agent_sandbox/_standard/api/client/models/sandbox_lifecycle.py +70 -0
- agent_sandbox/_standard/api/client/models/sandbox_log.py +70 -0
- agent_sandbox/_standard/api/client/models/sandbox_log_entry.py +93 -0
- agent_sandbox/_standard/api/client/models/sandbox_log_entry_fields.py +44 -0
- agent_sandbox/_standard/api/client/models/sandbox_logs.py +91 -0
- agent_sandbox/_standard/api/client/models/sandbox_logs_v2_response.py +73 -0
- agent_sandbox/_standard/api/client/models/sandbox_metric.py +126 -0
- agent_sandbox/_standard/api/client/models/sandbox_network_config.py +118 -0
- agent_sandbox/_standard/api/client/models/sandbox_network_config_rules.py +72 -0
- agent_sandbox/_standard/api/client/models/sandbox_network_rule.py +74 -0
- agent_sandbox/_standard/api/client/models/sandbox_network_transform.py +79 -0
- agent_sandbox/_standard/api/client/models/sandbox_network_transform_headers.py +47 -0
- agent_sandbox/_standard/api/client/models/sandbox_network_update_config.py +114 -0
- agent_sandbox/_standard/api/client/models/sandbox_network_update_config_rules.py +71 -0
- agent_sandbox/_standard/api/client/models/sandbox_on_timeout.py +9 -0
- agent_sandbox/_standard/api/client/models/sandbox_pause_request.py +62 -0
- agent_sandbox/_standard/api/client/models/sandbox_state.py +11 -0
- agent_sandbox/_standard/api/client/models/sandbox_volume_mount.py +67 -0
- agent_sandbox/_standard/api/client/models/sandboxes_with_metrics.py +59 -0
- agent_sandbox/_standard/api/client/models/snapshot_info.py +70 -0
- agent_sandbox/_standard/api/client/models/team.py +83 -0
- agent_sandbox/_standard/api/client/models/team_api_key.py +158 -0
- agent_sandbox/_standard/api/client/models/team_metric.py +86 -0
- agent_sandbox/_standard/api/client/models/team_user.py +75 -0
- agent_sandbox/_standard/api/client/models/template.py +225 -0
- agent_sandbox/_standard/api/client/models/template_alias_response.py +67 -0
- agent_sandbox/_standard/api/client/models/template_build.py +139 -0
- agent_sandbox/_standard/api/client/models/template_build_file_upload.py +70 -0
- agent_sandbox/_standard/api/client/models/template_build_info.py +126 -0
- agent_sandbox/_standard/api/client/models/template_build_logs_response.py +73 -0
- agent_sandbox/_standard/api/client/models/template_build_request.py +115 -0
- agent_sandbox/_standard/api/client/models/template_build_request_v2.py +88 -0
- agent_sandbox/_standard/api/client/models/template_build_request_v3.py +107 -0
- agent_sandbox/_standard/api/client/models/template_build_start_v2.py +184 -0
- agent_sandbox/_standard/api/client/models/template_build_status.py +11 -0
- agent_sandbox/_standard/api/client/models/template_legacy.py +207 -0
- agent_sandbox/_standard/api/client/models/template_request_response_v3.py +99 -0
- agent_sandbox/_standard/api/client/models/template_step.py +91 -0
- agent_sandbox/_standard/api/client/models/template_tag.py +78 -0
- agent_sandbox/_standard/api/client/models/template_update_request.py +59 -0
- agent_sandbox/_standard/api/client/models/template_update_response.py +59 -0
- agent_sandbox/_standard/api/client/models/template_with_builds.py +156 -0
- agent_sandbox/_standard/api/client/models/update_team_api_key.py +59 -0
- agent_sandbox/_standard/api/client/models/volume.py +67 -0
- agent_sandbox/_standard/api/client/models/volume_and_token.py +75 -0
- agent_sandbox/_standard/api/client/models/volume_token.py +59 -0
- agent_sandbox/_standard/api/client/py.typed +1 -0
- agent_sandbox/_standard/api/client/types.py +54 -0
- agent_sandbox/_standard/api/client_async/__init__.py +74 -0
- agent_sandbox/_standard/api/client_sync/__init__.py +73 -0
- agent_sandbox/_standard/api/metadata.py +8 -0
- agent_sandbox/_standard/connect/__init__.py +1 -0
- agent_sandbox/_standard/connect/client.py +534 -0
- agent_sandbox/_standard/connection_config.py +317 -0
- agent_sandbox/_standard/envd/api.py +170 -0
- agent_sandbox/_standard/envd/filesystem/filesystem_connect.py +193 -0
- agent_sandbox/_standard/envd/filesystem/filesystem_pb2.py +80 -0
- agent_sandbox/_standard/envd/process/process_connect.py +174 -0
- agent_sandbox/_standard/envd/process/process_pb2.py +96 -0
- agent_sandbox/_standard/envd/rpc.py +139 -0
- agent_sandbox/_standard/envd/versions.py +11 -0
- agent_sandbox/_standard/exceptions.py +133 -0
- agent_sandbox/_standard/io_utils.py +57 -0
- agent_sandbox/_standard/paginator.py +52 -0
- agent_sandbox/_standard/py.typed +0 -0
- agent_sandbox/_standard/sandbox/_git/__init__.py +85 -0
- agent_sandbox/_standard/sandbox/_git/args.py +363 -0
- agent_sandbox/_standard/sandbox/_git/auth.py +132 -0
- agent_sandbox/_standard/sandbox/_git/config.py +32 -0
- agent_sandbox/_standard/sandbox/_git/parse.py +222 -0
- agent_sandbox/_standard/sandbox/_git/types.py +149 -0
- agent_sandbox/_standard/sandbox/commands/command_handle.py +69 -0
- agent_sandbox/_standard/sandbox/commands/main.py +39 -0
- agent_sandbox/_standard/sandbox/filesystem/filesystem.py +337 -0
- agent_sandbox/_standard/sandbox/filesystem/watch_handle.py +70 -0
- agent_sandbox/_standard/sandbox/main.py +227 -0
- agent_sandbox/_standard/sandbox/mcp.py +1949 -0
- agent_sandbox/_standard/sandbox/network.py +8 -0
- agent_sandbox/_standard/sandbox/sandbox_api.py +626 -0
- agent_sandbox/_standard/sandbox/signature.py +47 -0
- agent_sandbox/_standard/sandbox/utils.py +34 -0
- agent_sandbox/_standard/sandbox_async/commands/command.py +396 -0
- agent_sandbox/_standard/sandbox_async/commands/command_handle.py +298 -0
- agent_sandbox/_standard/sandbox_async/commands/pty.py +257 -0
- agent_sandbox/_standard/sandbox_async/filesystem/filesystem.py +720 -0
- agent_sandbox/_standard/sandbox_async/filesystem/watch_handle.py +97 -0
- agent_sandbox/_standard/sandbox_async/git.py +1100 -0
- agent_sandbox/_standard/sandbox_async/main.py +993 -0
- agent_sandbox/_standard/sandbox_async/paginator.py +141 -0
- agent_sandbox/_standard/sandbox_async/sandbox_api.py +504 -0
- agent_sandbox/_standard/sandbox_async/utils.py +7 -0
- agent_sandbox/_standard/sandbox_domains.py +5 -0
- agent_sandbox/_standard/sandbox_sync/commands/command.py +420 -0
- agent_sandbox/_standard/sandbox_sync/commands/command_handle.py +239 -0
- agent_sandbox/_standard/sandbox_sync/commands/pty.py +279 -0
- agent_sandbox/_standard/sandbox_sync/filesystem/filesystem.py +710 -0
- agent_sandbox/_standard/sandbox_sync/filesystem/watch_handle.py +102 -0
- agent_sandbox/_standard/sandbox_sync/git.py +1077 -0
- agent_sandbox/_standard/sandbox_sync/main.py +981 -0
- agent_sandbox/_standard/sandbox_sync/paginator.py +141 -0
- agent_sandbox/_standard/sandbox_sync/sandbox_api.py +491 -0
- agent_sandbox/_standard/template/consts.py +45 -0
- agent_sandbox/_standard/template/dockerfile_parser.py +286 -0
- agent_sandbox/_standard/template/logger.py +232 -0
- agent_sandbox/_standard/template/main.py +1368 -0
- agent_sandbox/_standard/template/readycmd.py +144 -0
- agent_sandbox/_standard/template/types.py +194 -0
- agent_sandbox/_standard/template/utils.py +426 -0
- agent_sandbox/_standard/template_async/build_api.py +419 -0
- agent_sandbox/_standard/template_async/main.py +528 -0
- agent_sandbox/_standard/template_sync/build_api.py +409 -0
- agent_sandbox/_standard/template_sync/main.py +529 -0
- agent_sandbox/_standard/volume/client/__init__.py +8 -0
- agent_sandbox/_standard/volume/client/api/__init__.py +1 -0
- agent_sandbox/_standard/volume/client/api/volumes/__init__.py +1 -0
- agent_sandbox/_standard/volume/client/api/volumes/delete_volumecontent_volume_id_path.py +174 -0
- agent_sandbox/_standard/volume/client/api/volumes/get_volumecontent_volume_id_dir.py +204 -0
- agent_sandbox/_standard/volume/client/api/volumes/get_volumecontent_volume_id_file.py +179 -0
- agent_sandbox/_standard/volume/client/api/volumes/get_volumecontent_volume_id_path.py +176 -0
- agent_sandbox/_standard/volume/client/api/volumes/patch_volumecontent_volume_id_path.py +203 -0
- agent_sandbox/_standard/volume/client/api/volumes/post_volumecontent_volume_id_dir.py +239 -0
- agent_sandbox/_standard/volume/client/api/volumes/put_volumecontent_volume_id_file.py +259 -0
- agent_sandbox/_standard/volume/client/client.py +286 -0
- agent_sandbox/_standard/volume/client/errors.py +16 -0
- agent_sandbox/_standard/volume/client/models/__init__.py +13 -0
- agent_sandbox/_standard/volume/client/models/error.py +67 -0
- agent_sandbox/_standard/volume/client/models/patch_volumecontent_volume_id_path_body.py +77 -0
- agent_sandbox/_standard/volume/client/models/volume_entry_stat.py +145 -0
- agent_sandbox/_standard/volume/client/models/volume_entry_stat_type.py +11 -0
- agent_sandbox/_standard/volume/client/py.typed +1 -0
- agent_sandbox/_standard/volume/client/types.py +54 -0
- agent_sandbox/_standard/volume/client_async/__init__.py +88 -0
- agent_sandbox/_standard/volume/client_sync/__init__.py +80 -0
- agent_sandbox/_standard/volume/connection_config.py +145 -0
- agent_sandbox/_standard/volume/types.py +62 -0
- agent_sandbox/_standard/volume/utils.py +52 -0
- agent_sandbox/_standard/volume/volume_async.py +639 -0
- agent_sandbox/_standard/volume/volume_sync.py +639 -0
- agent_sandbox/_version.py +1 -0
- agent_sandbox/agent/__init__.py +5 -0
- agent_sandbox/agent/binary_files.py +114 -0
- agent_sandbox/agent/mcp.py +746 -0
- agent_sandbox/agent/mcp_http.py +568 -0
- agent_sandbox/agent/task_runtime.py +276 -0
- agent_sandbox/agent/tasks.py +191 -0
- agent_sandbox/agent/tools.py +787 -0
- agent_sandbox/api/__init__.py +33 -0
- agent_sandbox/api/capability.py +88 -0
- agent_sandbox/api/code.py +126 -0
- agent_sandbox/api/commands.py +367 -0
- agent_sandbox/api/files.py +247 -0
- agent_sandbox/api/network.py +69 -0
- agent_sandbox/api/sandbox.py +1350 -0
- agent_sandbox/api/server_capabilities.py +185 -0
- agent_sandbox/api/server_client.py +1537 -0
- agent_sandbox/api/session_manager.py +161 -0
- agent_sandbox/api/workflow.py +349 -0
- agent_sandbox/code_interpreter/LICENSE +9 -0
- agent_sandbox/code_interpreter/__init__.py +14 -0
- agent_sandbox/code_interpreter/charts.py +230 -0
- agent_sandbox/code_interpreter/code_interpreter_async.py +389 -0
- agent_sandbox/code_interpreter/code_interpreter_sync.py +383 -0
- agent_sandbox/code_interpreter/constants.py +3 -0
- agent_sandbox/code_interpreter/exceptions.py +20 -0
- agent_sandbox/code_interpreter/models.py +516 -0
- agent_sandbox/declarative/__init__.py +12 -0
- agent_sandbox/declarative/config.py +65 -0
- agent_sandbox/declarative/decorator.py +653 -0
- agent_sandbox/declarative/serializer.py +39 -0
- agent_sandbox/exceptions.py +3 -0
- agent_sandbox/models/__init__.py +126 -0
- agent_sandbox/models/errors.py +700 -0
- agent_sandbox/models/filesystem.py +43 -0
- agent_sandbox/models/process.py +70 -0
- agent_sandbox/models/sandbox.py +160 -0
- agent_sandbox/models/server.py +429 -0
- agent_sandbox/models/session.py +42 -0
- agent_sandbox/models/template.py +231 -0
- agent_sandbox/protocol/__init__.py +20 -0
- agent_sandbox/protocol/contracts.py +213 -0
- agent_sandbox/protocol/port.py +5 -0
- agent_sandbox/protocol/port_contract.py +47 -0
- agent_sandbox/providers/__init__.py +64 -0
- agent_sandbox/providers/__main__.py +272 -0
- agent_sandbox/providers/alicloud_express/__init__.py +1 -0
- agent_sandbox/providers/alicloud_express/auth.py +69 -0
- agent_sandbox/providers/alicloud_express/config_metadata.py +25 -0
- agent_sandbox/providers/alicloud_express/metadata.py +7 -0
- agent_sandbox/providers/alicloud_express/provider.py +187 -0
- agent_sandbox/providers/base.py +473 -0
- agent_sandbox/providers/bundled_config.py +13 -0
- agent_sandbox/providers/catalog.py +166 -0
- agent_sandbox/providers/commands.py +150 -0
- agent_sandbox/providers/config_distribution.py +14 -0
- agent_sandbox/providers/contract.py +19 -0
- agent_sandbox/providers/doctor.py +115 -0
- agent_sandbox/providers/engine_client.py +333 -0
- agent_sandbox/providers/engine_provider.py +645 -0
- agent_sandbox/providers/epp.py +535 -0
- agent_sandbox/providers/exec_provider.py +757 -0
- agent_sandbox/providers/feature_gate.py +160 -0
- agent_sandbox/providers/installer.py +838 -0
- agent_sandbox/providers/manifest.py +667 -0
- agent_sandbox/providers/registry.py +249 -0
- agent_sandbox/providers/rest_provider.py +165 -0
- agent_sandbox/providers/settings.py +89 -0
- agent_sandbox/providers/shared/__init__.py +1 -0
- agent_sandbox/providers/shared/e2b/__init__.py +1 -0
- agent_sandbox/providers/shared/e2b/auth.py +97 -0
- agent_sandbox/providers/shared/e2b/code_interpreter.py +43 -0
- agent_sandbox/providers/shared/e2b/filesystem.py +426 -0
- agent_sandbox/providers/shared/e2b/ports.py +40 -0
- agent_sandbox/providers/shared/e2b/process.py +367 -0
- agent_sandbox/providers/shared/e2b/sandbox.py +234 -0
- agent_sandbox/providers/shared/e2b/session.py +35 -0
- agent_sandbox/providers/shared/e2b/terminal.py +120 -0
- agent_sandbox/providers/shared/e2b/url.py +8 -0
- agent_sandbox/providers/store.py +325 -0
- agent_sandbox/providers/testing.py +396 -0
- agent_sandbox/py.typed +0 -0
- agent_sandbox/session/__init__.py +6 -0
- agent_sandbox/session/local.py +93 -0
- agent_sandbox/transport/__init__.py +27 -0
- agent_sandbox/transport/auth_contract.py +71 -0
- agent_sandbox/transport/codec.py +242 -0
- agent_sandbox/transport/config.py +430 -0
- agent_sandbox/transport/http.py +682 -0
- agent_sandbox/transport/streaming.py +89 -0
- agent_sandbox/transport/ws.py +156 -0
- agent_sandbox/utils/__init__.py +8 -0
- agent_sandbox/utils/async_bridge.py +115 -0
- agent_sandbox/utils/coerce.py +169 -0
- agent_sandbox/utils/config_keys.py +562 -0
- agent_sandbox/utils/github_token.py +97 -0
- agent_sandbox/utils/keychain.py +131 -0
- agent_sandbox/utils/logging.py +58 -0
- agent_sandbox/utils/registry.py +395 -0
- agent_sandbox/utils/retry.py +84 -0
- agent_sandbox/utils/template_index.py +549 -0
- agent_sandbox/utils/toml_write.py +42 -0
- agent_sandbox/workflows/__init__.py +5 -0
- agent_sandbox/workflows/identity.py +43 -0
- agent_sandbox/workflows/planner.py +228 -0
- agent_sandbox/workflows/receipt.schema.json +150 -0
- agent_sandbox/workflows/vectors.json +3726 -0
- agent_sandbox/workflows/verification-profiles.json +95 -0
- agent_sandbox/workflows/workflow-v1.json +426 -0
- agent_sandbox_client-0.3.1a1.dist-info/METADATA +151 -0
- agent_sandbox_client-0.3.1a1.dist-info/RECORD +350 -0
- agent_sandbox_client-0.3.1a1.dist-info/WHEEL +4 -0
- agent_sandbox_client-0.3.1a1.dist-info/licenses/LICENSE +200 -0
- agent_sandbox_client-0.3.1a1.dist-info/licenses/NOTICE +18 -0
|
@@ -0,0 +1,508 @@
|
|
|
1
|
+
"""Agent Sandbox Client SDK — Create, manage, and interact with cloud sandboxes."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from pkgutil import extend_path
|
|
6
|
+
from typing import TYPE_CHECKING, Any
|
|
7
|
+
|
|
8
|
+
from agent_sandbox._version import __version__
|
|
9
|
+
|
|
10
|
+
if TYPE_CHECKING:
|
|
11
|
+
from agent_sandbox._standard import (
|
|
12
|
+
ALL_TRAFFIC as ALL_TRAFFIC,
|
|
13
|
+
)
|
|
14
|
+
from agent_sandbox._standard import (
|
|
15
|
+
ApiClient as ApiClient,
|
|
16
|
+
)
|
|
17
|
+
from agent_sandbox._standard import (
|
|
18
|
+
ApiParams as ApiParams,
|
|
19
|
+
)
|
|
20
|
+
from agent_sandbox._standard import (
|
|
21
|
+
AsyncCommandHandle as AsyncCommandHandle,
|
|
22
|
+
)
|
|
23
|
+
from agent_sandbox._standard import (
|
|
24
|
+
AsyncSandbox as AsyncSandbox,
|
|
25
|
+
)
|
|
26
|
+
from agent_sandbox._standard import (
|
|
27
|
+
AsyncSandboxPaginator as AsyncSandboxPaginator,
|
|
28
|
+
)
|
|
29
|
+
from agent_sandbox._standard import (
|
|
30
|
+
AsyncSnapshotPaginator as AsyncSnapshotPaginator,
|
|
31
|
+
)
|
|
32
|
+
from agent_sandbox._standard import (
|
|
33
|
+
AsyncTemplate as AsyncTemplate,
|
|
34
|
+
)
|
|
35
|
+
from agent_sandbox._standard import (
|
|
36
|
+
AsyncVolume as AsyncVolume,
|
|
37
|
+
)
|
|
38
|
+
from agent_sandbox._standard import (
|
|
39
|
+
AsyncWatchHandle as AsyncWatchHandle,
|
|
40
|
+
)
|
|
41
|
+
from agent_sandbox._standard import (
|
|
42
|
+
AuthenticationException as AuthenticationException,
|
|
43
|
+
)
|
|
44
|
+
from agent_sandbox._standard import (
|
|
45
|
+
BuildException as BuildException,
|
|
46
|
+
)
|
|
47
|
+
from agent_sandbox._standard import (
|
|
48
|
+
BuildInfo as BuildInfo,
|
|
49
|
+
)
|
|
50
|
+
from agent_sandbox._standard import (
|
|
51
|
+
BuildStatusReason as BuildStatusReason,
|
|
52
|
+
)
|
|
53
|
+
from agent_sandbox._standard import (
|
|
54
|
+
CommandExitException as CommandExitException,
|
|
55
|
+
)
|
|
56
|
+
from agent_sandbox._standard import (
|
|
57
|
+
CommandHandle as CommandHandle,
|
|
58
|
+
)
|
|
59
|
+
from agent_sandbox._standard import (
|
|
60
|
+
CommandResult as CommandResult,
|
|
61
|
+
)
|
|
62
|
+
from agent_sandbox._standard import (
|
|
63
|
+
ConnectionConfig as ConnectionConfig,
|
|
64
|
+
)
|
|
65
|
+
from agent_sandbox._standard import (
|
|
66
|
+
CopyItem as CopyItem,
|
|
67
|
+
)
|
|
68
|
+
from agent_sandbox._standard import (
|
|
69
|
+
EntryInfo as EntryInfo,
|
|
70
|
+
)
|
|
71
|
+
from agent_sandbox._standard import (
|
|
72
|
+
FileNotFoundException as FileNotFoundException,
|
|
73
|
+
)
|
|
74
|
+
from agent_sandbox._standard import (
|
|
75
|
+
FilesystemEvent as FilesystemEvent,
|
|
76
|
+
)
|
|
77
|
+
from agent_sandbox._standard import (
|
|
78
|
+
FilesystemEventType as FilesystemEventType,
|
|
79
|
+
)
|
|
80
|
+
from agent_sandbox._standard import (
|
|
81
|
+
FileType as FileType,
|
|
82
|
+
)
|
|
83
|
+
from agent_sandbox._standard import (
|
|
84
|
+
FileUploadException as FileUploadException,
|
|
85
|
+
)
|
|
86
|
+
from agent_sandbox._standard import (
|
|
87
|
+
Git as Git,
|
|
88
|
+
)
|
|
89
|
+
from agent_sandbox._standard import (
|
|
90
|
+
GitAuthException as GitAuthException,
|
|
91
|
+
)
|
|
92
|
+
from agent_sandbox._standard import (
|
|
93
|
+
GitBranches as GitBranches,
|
|
94
|
+
)
|
|
95
|
+
from agent_sandbox._standard import (
|
|
96
|
+
GitFileStatus as GitFileStatus,
|
|
97
|
+
)
|
|
98
|
+
from agent_sandbox._standard import (
|
|
99
|
+
GitHubMcpServer as GitHubMcpServer,
|
|
100
|
+
)
|
|
101
|
+
from agent_sandbox._standard import (
|
|
102
|
+
GitHubMcpServerConfig as GitHubMcpServerConfig,
|
|
103
|
+
)
|
|
104
|
+
from agent_sandbox._standard import (
|
|
105
|
+
GitResetMode as GitResetMode,
|
|
106
|
+
)
|
|
107
|
+
from agent_sandbox._standard import (
|
|
108
|
+
GitStatus as GitStatus,
|
|
109
|
+
)
|
|
110
|
+
from agent_sandbox._standard import (
|
|
111
|
+
GitUpstreamException as GitUpstreamException,
|
|
112
|
+
)
|
|
113
|
+
from agent_sandbox._standard import (
|
|
114
|
+
InvalidArgumentException as InvalidArgumentException,
|
|
115
|
+
)
|
|
116
|
+
from agent_sandbox._standard import (
|
|
117
|
+
LogEntry as LogEntry,
|
|
118
|
+
)
|
|
119
|
+
from agent_sandbox._standard import (
|
|
120
|
+
LogEntryEnd as LogEntryEnd,
|
|
121
|
+
)
|
|
122
|
+
from agent_sandbox._standard import (
|
|
123
|
+
LogEntryLevel as LogEntryLevel,
|
|
124
|
+
)
|
|
125
|
+
from agent_sandbox._standard import (
|
|
126
|
+
LogEntryStart as LogEntryStart,
|
|
127
|
+
)
|
|
128
|
+
from agent_sandbox._standard import (
|
|
129
|
+
McpServer as McpServer,
|
|
130
|
+
)
|
|
131
|
+
from agent_sandbox._standard import (
|
|
132
|
+
NotEnoughSpaceException as NotEnoughSpaceException,
|
|
133
|
+
)
|
|
134
|
+
from agent_sandbox._standard import (
|
|
135
|
+
NotFoundException as NotFoundException,
|
|
136
|
+
)
|
|
137
|
+
from agent_sandbox._standard import (
|
|
138
|
+
OutputHandler as OutputHandler,
|
|
139
|
+
)
|
|
140
|
+
from agent_sandbox._standard import (
|
|
141
|
+
ProcessInfo as ProcessInfo,
|
|
142
|
+
)
|
|
143
|
+
from agent_sandbox._standard import (
|
|
144
|
+
ProxyTypes as ProxyTypes,
|
|
145
|
+
)
|
|
146
|
+
from agent_sandbox._standard import (
|
|
147
|
+
PtyOutput as PtyOutput,
|
|
148
|
+
)
|
|
149
|
+
from agent_sandbox._standard import (
|
|
150
|
+
PtySize as PtySize,
|
|
151
|
+
)
|
|
152
|
+
from agent_sandbox._standard import (
|
|
153
|
+
RateLimitException as RateLimitException,
|
|
154
|
+
)
|
|
155
|
+
from agent_sandbox._standard import (
|
|
156
|
+
ReadyCmd as ReadyCmd,
|
|
157
|
+
)
|
|
158
|
+
from agent_sandbox._standard import (
|
|
159
|
+
Sandbox as Sandbox,
|
|
160
|
+
)
|
|
161
|
+
from agent_sandbox._standard import (
|
|
162
|
+
SandboxException as SandboxException,
|
|
163
|
+
)
|
|
164
|
+
from agent_sandbox._standard import (
|
|
165
|
+
SandboxInfo as SandboxInfo,
|
|
166
|
+
)
|
|
167
|
+
from agent_sandbox._standard import (
|
|
168
|
+
SandboxInfoLifecycle as SandboxInfoLifecycle,
|
|
169
|
+
)
|
|
170
|
+
from agent_sandbox._standard import (
|
|
171
|
+
SandboxLifecycle as SandboxLifecycle,
|
|
172
|
+
)
|
|
173
|
+
from agent_sandbox._standard import (
|
|
174
|
+
SandboxMetrics as SandboxMetrics,
|
|
175
|
+
)
|
|
176
|
+
from agent_sandbox._standard import (
|
|
177
|
+
SandboxNetworkInfo as SandboxNetworkInfo,
|
|
178
|
+
)
|
|
179
|
+
from agent_sandbox._standard import (
|
|
180
|
+
SandboxNetworkOpts as SandboxNetworkOpts,
|
|
181
|
+
)
|
|
182
|
+
from agent_sandbox._standard import (
|
|
183
|
+
SandboxNetworkRule as SandboxNetworkRule,
|
|
184
|
+
)
|
|
185
|
+
from agent_sandbox._standard import (
|
|
186
|
+
SandboxNetworkRuleInfo as SandboxNetworkRuleInfo,
|
|
187
|
+
)
|
|
188
|
+
from agent_sandbox._standard import (
|
|
189
|
+
SandboxNetworkRules as SandboxNetworkRules,
|
|
190
|
+
)
|
|
191
|
+
from agent_sandbox._standard import (
|
|
192
|
+
SandboxNetworkSelector as SandboxNetworkSelector,
|
|
193
|
+
)
|
|
194
|
+
from agent_sandbox._standard import (
|
|
195
|
+
SandboxNetworkSelectorContext as SandboxNetworkSelectorContext,
|
|
196
|
+
)
|
|
197
|
+
from agent_sandbox._standard import (
|
|
198
|
+
SandboxNetworkTransform as SandboxNetworkTransform,
|
|
199
|
+
)
|
|
200
|
+
from agent_sandbox._standard import (
|
|
201
|
+
SandboxNetworkUpdate as SandboxNetworkUpdate,
|
|
202
|
+
)
|
|
203
|
+
from agent_sandbox._standard import (
|
|
204
|
+
SandboxNotFoundException as SandboxNotFoundException,
|
|
205
|
+
)
|
|
206
|
+
from agent_sandbox._standard import (
|
|
207
|
+
SandboxOnTimeout as SandboxOnTimeout,
|
|
208
|
+
)
|
|
209
|
+
from agent_sandbox._standard import (
|
|
210
|
+
SandboxPaginator as SandboxPaginator,
|
|
211
|
+
)
|
|
212
|
+
from agent_sandbox._standard import (
|
|
213
|
+
SandboxQuery as SandboxQuery,
|
|
214
|
+
)
|
|
215
|
+
from agent_sandbox._standard import (
|
|
216
|
+
SandboxState as SandboxState,
|
|
217
|
+
)
|
|
218
|
+
from agent_sandbox._standard import (
|
|
219
|
+
SnapshotInfo as SnapshotInfo,
|
|
220
|
+
)
|
|
221
|
+
from agent_sandbox._standard import (
|
|
222
|
+
SnapshotPaginator as SnapshotPaginator,
|
|
223
|
+
)
|
|
224
|
+
from agent_sandbox._standard import (
|
|
225
|
+
Stderr as Stderr,
|
|
226
|
+
)
|
|
227
|
+
from agent_sandbox._standard import (
|
|
228
|
+
Stdout as Stdout,
|
|
229
|
+
)
|
|
230
|
+
from agent_sandbox._standard import (
|
|
231
|
+
Template as Template,
|
|
232
|
+
)
|
|
233
|
+
from agent_sandbox._standard import (
|
|
234
|
+
TemplateBase as TemplateBase,
|
|
235
|
+
)
|
|
236
|
+
from agent_sandbox._standard import (
|
|
237
|
+
TemplateBuildStatus as TemplateBuildStatus,
|
|
238
|
+
)
|
|
239
|
+
from agent_sandbox._standard import (
|
|
240
|
+
TemplateBuildStatusResponse as TemplateBuildStatusResponse,
|
|
241
|
+
)
|
|
242
|
+
from agent_sandbox._standard import (
|
|
243
|
+
TemplateClass as TemplateClass,
|
|
244
|
+
)
|
|
245
|
+
from agent_sandbox._standard import (
|
|
246
|
+
TemplateException as TemplateException,
|
|
247
|
+
)
|
|
248
|
+
from agent_sandbox._standard import (
|
|
249
|
+
TemplateTag as TemplateTag,
|
|
250
|
+
)
|
|
251
|
+
from agent_sandbox._standard import (
|
|
252
|
+
TemplateTagInfo as TemplateTagInfo,
|
|
253
|
+
)
|
|
254
|
+
from agent_sandbox._standard import (
|
|
255
|
+
TimeoutException as TimeoutException,
|
|
256
|
+
)
|
|
257
|
+
from agent_sandbox._standard import (
|
|
258
|
+
Username as Username,
|
|
259
|
+
)
|
|
260
|
+
from agent_sandbox._standard import (
|
|
261
|
+
Volume as Volume,
|
|
262
|
+
)
|
|
263
|
+
from agent_sandbox._standard import (
|
|
264
|
+
VolumeAndToken as VolumeAndToken,
|
|
265
|
+
)
|
|
266
|
+
from agent_sandbox._standard import (
|
|
267
|
+
VolumeApiParams as VolumeApiParams,
|
|
268
|
+
)
|
|
269
|
+
from agent_sandbox._standard import (
|
|
270
|
+
VolumeConnectionConfig as VolumeConnectionConfig,
|
|
271
|
+
)
|
|
272
|
+
from agent_sandbox._standard import (
|
|
273
|
+
VolumeEntryStat as VolumeEntryStat,
|
|
274
|
+
)
|
|
275
|
+
from agent_sandbox._standard import (
|
|
276
|
+
VolumeException as VolumeException,
|
|
277
|
+
)
|
|
278
|
+
from agent_sandbox._standard import (
|
|
279
|
+
VolumeFileType as VolumeFileType,
|
|
280
|
+
)
|
|
281
|
+
from agent_sandbox._standard import (
|
|
282
|
+
VolumeInfo as VolumeInfo,
|
|
283
|
+
)
|
|
284
|
+
from agent_sandbox._standard import (
|
|
285
|
+
WatchHandle as WatchHandle,
|
|
286
|
+
)
|
|
287
|
+
from agent_sandbox._standard import (
|
|
288
|
+
WriteInfo as WriteInfo,
|
|
289
|
+
)
|
|
290
|
+
from agent_sandbox._standard import (
|
|
291
|
+
client as client,
|
|
292
|
+
)
|
|
293
|
+
from agent_sandbox._standard import (
|
|
294
|
+
default_build_logger as default_build_logger,
|
|
295
|
+
)
|
|
296
|
+
from agent_sandbox._standard import (
|
|
297
|
+
get_signature as get_signature,
|
|
298
|
+
)
|
|
299
|
+
from agent_sandbox._standard import (
|
|
300
|
+
wait_for_file as wait_for_file,
|
|
301
|
+
)
|
|
302
|
+
from agent_sandbox._standard import (
|
|
303
|
+
wait_for_port as wait_for_port,
|
|
304
|
+
)
|
|
305
|
+
from agent_sandbox._standard import (
|
|
306
|
+
wait_for_process as wait_for_process,
|
|
307
|
+
)
|
|
308
|
+
from agent_sandbox._standard import (
|
|
309
|
+
wait_for_timeout as wait_for_timeout,
|
|
310
|
+
)
|
|
311
|
+
from agent_sandbox._standard import (
|
|
312
|
+
wait_for_url as wait_for_url,
|
|
313
|
+
)
|
|
314
|
+
from agent_sandbox.api.sandbox import Sandbox as ProviderSandbox
|
|
315
|
+
|
|
316
|
+
# ``agent_sandbox`` is a shared namespace: ``agent_sandbox.server`` ships in the
|
|
317
|
+
# separate ``agent-sandbox-server`` distribution, possibly installed in another
|
|
318
|
+
# directory (editable installs, vendored layouts).
|
|
319
|
+
__path__ = extend_path(__path__, __name__)
|
|
320
|
+
|
|
321
|
+
__all__ = [
|
|
322
|
+
"__version__",
|
|
323
|
+
"Sandbox",
|
|
324
|
+
"AsyncSandbox",
|
|
325
|
+
"ProviderSandbox",
|
|
326
|
+
"SandboxError",
|
|
327
|
+
"AuthenticationError",
|
|
328
|
+
"SandboxCreationError",
|
|
329
|
+
"ExecutionError",
|
|
330
|
+
"FileOperationError",
|
|
331
|
+
"NetworkError",
|
|
332
|
+
"sandbox",
|
|
333
|
+
]
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
def __getattr__(name: str) -> Any:
|
|
337
|
+
if name == "ProviderSandbox":
|
|
338
|
+
from agent_sandbox.api.sandbox import Sandbox
|
|
339
|
+
|
|
340
|
+
return Sandbox
|
|
341
|
+
if name in _STANDARD_EXPORTS:
|
|
342
|
+
from agent_sandbox import _standard
|
|
343
|
+
|
|
344
|
+
return getattr(_standard, name)
|
|
345
|
+
if name in (
|
|
346
|
+
"SandboxError",
|
|
347
|
+
"AuthenticationError",
|
|
348
|
+
"SandboxCreationError",
|
|
349
|
+
"ExecutionError",
|
|
350
|
+
"FileOperationError",
|
|
351
|
+
"NetworkError",
|
|
352
|
+
):
|
|
353
|
+
from agent_sandbox.models import errors
|
|
354
|
+
|
|
355
|
+
return getattr(errors, name)
|
|
356
|
+
if name == "sandbox":
|
|
357
|
+
from agent_sandbox.declarative.decorator import sandbox as _sandbox
|
|
358
|
+
|
|
359
|
+
return _sandbox
|
|
360
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
|
361
|
+
|
|
362
|
+
|
|
363
|
+
_STANDARD_EXPORTS = (
|
|
364
|
+
"ApiClient",
|
|
365
|
+
"client",
|
|
366
|
+
"ConnectionConfig",
|
|
367
|
+
"VolumeConnectionConfig",
|
|
368
|
+
"ProxyTypes",
|
|
369
|
+
"ApiParams",
|
|
370
|
+
"VolumeApiParams",
|
|
371
|
+
"Username",
|
|
372
|
+
"SandboxException",
|
|
373
|
+
"TimeoutException",
|
|
374
|
+
"NotFoundException",
|
|
375
|
+
"FileNotFoundException",
|
|
376
|
+
"SandboxNotFoundException",
|
|
377
|
+
"AuthenticationException",
|
|
378
|
+
"GitAuthException",
|
|
379
|
+
"GitUpstreamException",
|
|
380
|
+
"InvalidArgumentException",
|
|
381
|
+
"NotEnoughSpaceException",
|
|
382
|
+
"TemplateException",
|
|
383
|
+
"BuildException",
|
|
384
|
+
"FileUploadException",
|
|
385
|
+
"RateLimitException",
|
|
386
|
+
"VolumeException",
|
|
387
|
+
"SandboxInfo",
|
|
388
|
+
"SandboxInfoLifecycle",
|
|
389
|
+
"SandboxMetrics",
|
|
390
|
+
"ProcessInfo",
|
|
391
|
+
"SandboxQuery",
|
|
392
|
+
"SandboxState",
|
|
393
|
+
"SandboxMetrics",
|
|
394
|
+
"GitStatus",
|
|
395
|
+
"GitBranches",
|
|
396
|
+
"GitFileStatus",
|
|
397
|
+
"GitResetMode",
|
|
398
|
+
"CommandResult",
|
|
399
|
+
"Stderr",
|
|
400
|
+
"Stdout",
|
|
401
|
+
"CommandExitException",
|
|
402
|
+
"PtyOutput",
|
|
403
|
+
"PtySize",
|
|
404
|
+
"FilesystemEvent",
|
|
405
|
+
"FilesystemEventType",
|
|
406
|
+
"EntryInfo",
|
|
407
|
+
"WriteInfo",
|
|
408
|
+
"FileType",
|
|
409
|
+
"SandboxNetworkOpts",
|
|
410
|
+
"SandboxNetworkInfo",
|
|
411
|
+
"SandboxNetworkSelector",
|
|
412
|
+
"SandboxNetworkSelectorContext",
|
|
413
|
+
"SandboxNetworkRule",
|
|
414
|
+
"SandboxNetworkRuleInfo",
|
|
415
|
+
"SandboxNetworkRules",
|
|
416
|
+
"SandboxNetworkTransform",
|
|
417
|
+
"SandboxNetworkUpdate",
|
|
418
|
+
"SandboxLifecycle",
|
|
419
|
+
"SandboxOnTimeout",
|
|
420
|
+
"ALL_TRAFFIC",
|
|
421
|
+
"SnapshotInfo",
|
|
422
|
+
"SnapshotPaginator",
|
|
423
|
+
"AsyncSnapshotPaginator",
|
|
424
|
+
"get_signature",
|
|
425
|
+
"Sandbox",
|
|
426
|
+
"SandboxPaginator",
|
|
427
|
+
"WatchHandle",
|
|
428
|
+
"CommandHandle",
|
|
429
|
+
"OutputHandler",
|
|
430
|
+
"AsyncSandboxPaginator",
|
|
431
|
+
"AsyncSandbox",
|
|
432
|
+
"AsyncWatchHandle",
|
|
433
|
+
"AsyncCommandHandle",
|
|
434
|
+
"Template",
|
|
435
|
+
"AsyncTemplate",
|
|
436
|
+
"TemplateBase",
|
|
437
|
+
"TemplateClass",
|
|
438
|
+
"CopyItem",
|
|
439
|
+
"BuildInfo",
|
|
440
|
+
"BuildStatusReason",
|
|
441
|
+
"TemplateBuildStatus",
|
|
442
|
+
"TemplateBuildStatusResponse",
|
|
443
|
+
"TemplateTag",
|
|
444
|
+
"TemplateTagInfo",
|
|
445
|
+
"ReadyCmd",
|
|
446
|
+
"wait_for_file",
|
|
447
|
+
"wait_for_url",
|
|
448
|
+
"wait_for_port",
|
|
449
|
+
"wait_for_process",
|
|
450
|
+
"wait_for_timeout",
|
|
451
|
+
"LogEntry",
|
|
452
|
+
"LogEntryStart",
|
|
453
|
+
"LogEntryEnd",
|
|
454
|
+
"LogEntryLevel",
|
|
455
|
+
"default_build_logger",
|
|
456
|
+
"McpServer",
|
|
457
|
+
"GitHubMcpServer",
|
|
458
|
+
"GitHubMcpServerConfig",
|
|
459
|
+
"Git",
|
|
460
|
+
"Volume",
|
|
461
|
+
"AsyncVolume",
|
|
462
|
+
"VolumeInfo",
|
|
463
|
+
"VolumeAndToken",
|
|
464
|
+
"VolumeEntryStat",
|
|
465
|
+
"VolumeFileType",
|
|
466
|
+
)
|
|
467
|
+
__all__ = list(dict.fromkeys([*__all__, *_STANDARD_EXPORTS]))
|
|
468
|
+
|
|
469
|
+
|
|
470
|
+
def __dir__() -> list[str]:
|
|
471
|
+
"""Expose lazy public symbols to normal module introspection."""
|
|
472
|
+
return sorted(set(globals()) | set(__all__))
|
|
473
|
+
|
|
474
|
+
|
|
475
|
+
def _resolve_provider_schema(provider_id: str) -> Any:
|
|
476
|
+
"""Composition adapter; discovery stays lazy and outside transport."""
|
|
477
|
+
from agent_sandbox._provider_schema import ProviderSchema
|
|
478
|
+
from agent_sandbox.providers.bundled_config import bundled_config
|
|
479
|
+
|
|
480
|
+
metadata = bundled_config(provider_id)
|
|
481
|
+
if metadata is not None:
|
|
482
|
+
return ProviderSchema(
|
|
483
|
+
metadata["id"],
|
|
484
|
+
metadata["keys"],
|
|
485
|
+
metadata["inherit"],
|
|
486
|
+
dict(metadata["derive"]),
|
|
487
|
+
dict(metadata["endpoint_defaults"]),
|
|
488
|
+
transport_fields=metadata["transport_fields"],
|
|
489
|
+
omit_default_options=metadata["omit_default_options"],
|
|
490
|
+
)
|
|
491
|
+
from agent_sandbox.providers.registry import get_provider
|
|
492
|
+
|
|
493
|
+
provider = get_provider(provider_id)
|
|
494
|
+
return ProviderSchema(
|
|
495
|
+
provider.id,
|
|
496
|
+
provider.config_keys(),
|
|
497
|
+
frozenset(provider.inherit),
|
|
498
|
+
dict(provider.derive),
|
|
499
|
+
dict(getattr(provider, "endpoint_defaults", {}) or {}),
|
|
500
|
+
transport_fields=frozenset(getattr(provider, "transport_fields", ())),
|
|
501
|
+
omit_default_options=bool(getattr(provider, "omit_default_options", False)),
|
|
502
|
+
)
|
|
503
|
+
|
|
504
|
+
|
|
505
|
+
from agent_sandbox._provider_schema import _set_resolver # noqa: E402
|
|
506
|
+
|
|
507
|
+
_set_resolver(_resolve_provider_schema)
|
|
508
|
+
del _set_resolver
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"""Low-level configuration schema values and a composition-injected resolver.
|
|
2
|
+
|
|
3
|
+
No provider discovery/import is performed by this module. The package root
|
|
4
|
+
registers a lazy adapter; transport depends only on these values and callback.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
from typing import TYPE_CHECKING
|
|
10
|
+
|
|
11
|
+
if TYPE_CHECKING:
|
|
12
|
+
from collections.abc import Callable
|
|
13
|
+
|
|
14
|
+
from agent_sandbox.utils.config_keys import ConfigKey
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class ProviderSchema:
|
|
18
|
+
"""What the resolver needs to know about the selected provider."""
|
|
19
|
+
|
|
20
|
+
def __init__(
|
|
21
|
+
self,
|
|
22
|
+
provider_id: str,
|
|
23
|
+
keys: tuple[ConfigKey, ...],
|
|
24
|
+
inherit: frozenset[str],
|
|
25
|
+
derive: dict[str, str] | None = None,
|
|
26
|
+
endpoint_defaults: dict[str, str] | None = None,
|
|
27
|
+
*,
|
|
28
|
+
transport_fields: frozenset[str] = frozenset(),
|
|
29
|
+
omit_default_options: bool = False,
|
|
30
|
+
) -> None:
|
|
31
|
+
self.provider_id = provider_id
|
|
32
|
+
self.keys = keys
|
|
33
|
+
self.inherit = inherit
|
|
34
|
+
self.derive = derive or {}
|
|
35
|
+
self.endpoint_defaults = endpoint_defaults or {}
|
|
36
|
+
self.transport_fields = transport_fields
|
|
37
|
+
self.omit_default_options = omit_default_options
|
|
38
|
+
|
|
39
|
+
@property
|
|
40
|
+
def builtin(self) -> bool:
|
|
41
|
+
from agent_sandbox.utils.config_keys import BUILTIN_PROVIDER_ID
|
|
42
|
+
|
|
43
|
+
return self.provider_id == BUILTIN_PROVIDER_ID
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
_resolver: Callable[[str], ProviderSchema] | None = None
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def _set_resolver(resolver: Callable[[str], ProviderSchema]) -> None:
|
|
50
|
+
global _resolver
|
|
51
|
+
_resolver = resolver
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def resolve_provider_schema(provider_id: str) -> ProviderSchema:
|
|
55
|
+
if _resolver is None:
|
|
56
|
+
raise RuntimeError("The provider configuration resolver is not initialized.")
|
|
57
|
+
return _resolver(provider_id)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 FOUNDRYLABS, INC.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Local changes to the pinned source port
|
|
2
|
+
|
|
3
|
+
`SOURCES.json` records original source hashes, not hashes after relocation. The fixed
|
|
4
|
+
sources are E2B 2.31.0, E2B Code Interpreter 2.8.1 and their bundled Connect runtime.
|
|
5
|
+
The adjacent MIT LICENSE files preserve upstream attribution. This is maintained
|
|
6
|
+
project source; changing an original source hash requires an intentional baseline update.
|
|
7
|
+
|
|
8
|
+
Local changes beyond namespace relocation:
|
|
9
|
+
|
|
10
|
+
- Import `agent_sandbox._standard.connect` instead of the bundled top-level e2b_connect.
|
|
11
|
+
- Use project package metadata and version; do not require installed E2B distributions.
|
|
12
|
+
- Read canonical E2B connection settings with project config-file fallback; default to
|
|
13
|
+
Alibaba Express, derive explicit domains correctly, and accept Alibaba-issued API keys.
|
|
14
|
+
- Support Alibaba's documented optional snapshot `name` list filter in sync and async
|
|
15
|
+
clients/paginators, which the fixed Python SDK does not expose. Preserve all existing
|
|
16
|
+
positional arguments. Encode qualified snapshot names in the template deletion path.
|
|
17
|
+
- Accept Alibaba snapshotting/snapshot_failed states in lifecycle/list responses.
|
|
18
|
+
- Replace example workstation home paths in MCP documentation with generic paths.
|
|
19
|
+
|
|
20
|
+
Run `scripts/check_standard_contract.py` with a separately installed reference interpreter,
|
|
21
|
+
contract unit tests, real-cloud migration scenarios and package checks after changes.
|
|
22
|
+
The shape comparison allows only the documented additional snapshot-name keyword.
|
|
23
|
+
Runtime source imports never load an external E2B distribution.
|