Skip to main content

Crate ai6_theater_container

Crate ai6_theater_container 

Source
Expand description

ai6-theater-container: the ephemeral-container Theater provider. It makes a fresh Docker or Podman container per Mission from an image, reached afterwards by the container transport, and removes it when the Station is done with it.

§ai6-theater-container

Version Rust version License: MPL-2.0 Docs CI

The ephemeral-container Theater provider for AI6: a fresh Docker or Podman container for each Mission, made from an image, reached by the container transport, and removed once the Mission is done. See the API header.

§Features

  • One container per Mission, labelled with its template and Mission, so a Station that restarts finds and adopts it again.
  • Docker and Podman alike: only the engine setting differs.
  • Extra run options (a network mode, a volume) from the template.

§Installation

Part of the AI6 workspace; built with it:

cargo build -p ai6 --features cli -p ai6-theater-container

§Quick start

[theater.scratch]
access = { ephemeral = { provider = "ephemeral-container", config = { image = "fedora:44", engine = "podman" } } }
agents = "remote-hands"
workdir = "/work"

§Development

cargo test -p ai6-theater-container
cargo clippy -p ai6-theater-container --all-targets -- -D warnings

A test against a real engine runs only when AI6_TEST_THEATER_IMAGE names an image already present (AI6_TEST_ENGINE the engine).

§License

MPL-2.0. See LICENSE.

Structs§

ContainerTheaters
Containers made from one image, one per Mission.
Settings
A template’s container settings. Unknown keys are refused.

Constants§

CREATED_LABEL
The label that holds when a container was made, as Unix seconds.
MISSION_LABEL
The label that names the Mission a container was made for.
TEMPLATE_LABEL
The label that names the template a container was made from.

Statics§

guatiao_declares
What this library declares, read by a scanner as data.

Traits§

Engine
Runs the engine’s command line. The real one starts the executable; a test stands in for the engine with its own.

Functions§

container_name
The container a Theater named name is.
guatiao_library_entry⚠
The symbol a guatiao host loads this library by.