capsule AI-native Unix-like composition layer

lab-runtime-docker v0.2.1

subsystem education.ctf

capsule://capsule-examples/lab-runtime-docker@0.2.1

Runs per-student lab containers on a single Docker host and exposes a
browser-accessible terminal. One lab belongs to exactly one student,
for the duration of one challenge attempt.

Owns

Does not own

AI orientation

You are looking at the lab-runtime capsule. It owns container lifecycle
for student CTF labs. It does NOT own authentication — assume an upstream
auth-core capsule has already authorized the caller and passed a verified
`student_id` in the request context. Lab metadata is world-readable to
instructors, so it must never contain secrets.

Avoid

Extension points

lab-image-resolver at src/runtime/images.py:resolve_image
Given (challenge_id, student_id) return a Docker image reference.
Must be deterministic for a given challenge_id; do not branch on
student_id (would break instructor reproduction of student state).

Provides

Requires

Dependencies

Capsules

Runtime

Invariants (must always hold)

Handoff — work in progress

Objective. Emit lab.created events that the ai-report capsule can consume.

Completed

Remaining

Next agent should

Do not touch

Open questions

Glossary

lab
a single container instance owned by exactly one student
challenge
a reusable CTF problem definition; spawns labs

Source

https://github.com/quake0day/capsule-examples/blob/main/wolfctf/lab-runtime/capsule.yaml

Pull this capsule locally:

capsule pull capsule://capsule-examples/lab-runtime-docker@0.2.1

Or render to your terminal:

capsule man capsule://capsule-examples/lab-runtime-docker@0.2.1