Base
InContainerMountAdapter
Default adapter for mounts materialized by commands inside the sandbox.
Provider-backed mounts use this directly to translate model fields into a
MountPatternConfig, then run the selected MountPattern.
ソースコード位置: src/agents/sandbox/entries/mounts/base.py
DockerVolumeMountAdapter
Default adapter for mounts attached by the host container runtime.
ソースコード位置: src/agents/sandbox/entries/mounts/base.py
MountStrategyBase
Bases: BaseModel, ABC
ソースコード位置: src/agents/sandbox/entries/mounts/base.py
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 | |
supports_native_snapshot_detach
supports_native_snapshot_detach(mount: Mount) -> bool
Return whether native snapshot flows can safely detach this mount in-place.
Mount
Bases: BaseEntry
A manifest entry that exposes external storage inside the sandbox workspace.
Mount holds strategy-independent mount metadata and delegates lifecycle behavior to
mount_strategy. Provider subclasses describe what to mount; the strategy describes how the
backend should make it available.
ソースコード位置: src/agents/sandbox/entries/mounts/base.py
337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 | |
model_post_init
Normalize mount metadata and validate that the active strategy fits this mount type.
ソースコード位置: src/agents/sandbox/entries/mounts/base.py
in_container_adapter
in_container_adapter() -> InContainerMountAdapter
Return the strategy adapter for in-container mount lifecycle.
Mount subclasses that do not support in-container mounts inherit this default unsupported implementation.
ソースコード位置: src/agents/sandbox/entries/mounts/base.py
docker_volume_adapter
docker_volume_adapter() -> DockerVolumeMountAdapter
apply
async
apply(
session: BaseSandboxSession, dest: Path, base_dir: Path
) -> list[MaterializedFile]
Activate this mount for a manifest application pass.
In-container strategies run a live mount command here. Docker-volume strategies are intentionally no-ops because the backend attaches them before the session starts.
ソースコード位置: src/agents/sandbox/entries/mounts/base.py
unmount
async
unmount(
session: BaseSandboxSession, dest: Path, base_dir: Path
) -> None
Deactivate this mount for manifest teardown.
build_in_container_mount_config
async
build_in_container_mount_config(
session: BaseSandboxSession,
pattern: MountPattern,
*,
include_config_text: bool,
) -> MountPatternConfig | None
Return pattern runtime config for provider-backed in-container mounts.
ソースコード位置: src/agents/sandbox/entries/mounts/base.py
supported_in_container_patterns
Return the MountPattern classes accepted by InContainerMountStrategy.
supported_docker_volume_drivers
Return Docker volume driver names accepted by DockerVolumeMountStrategy.
build_docker_volume_driver_config
build_docker_volume_driver_config(
strategy: DockerVolumeMountStrategy,
) -> tuple[str, dict[str, str], bool]
Build the Docker volume driver tuple for Docker-volume mounts.
Mount subclasses that do not support Docker volumes inherit this default unsupported implementation.