Skip to main content
The ParsedLab type represents a fully resolved lab configuration with services, workspace settings, and file scaffolding.

ParsedLab

title
string
required
Lab title
instructions
string
required
Markdown instructions rendered in the lab sidebar
filesPath
string
required
Absolute path to scaffold files directory
solutionPath
string | undefined
required
Absolute path to solution directory, or undefined if no solution exists
workspace
'fresh' | 'continue'
required
Workspace lifecycle mode. 'fresh' resets to scaffold on each provision. 'continue' preserves previous state.
testCommand
string
required
Shell command to run tests (e.g., 'npm test')
openFiles
readonly string[]
required
List of file paths to open in editor on lab start
services
readonly ResolvedService[]
required
Docker/Podman services to provision
setup
readonly string[]
required
Shell commands to run after workspace provision

ResolvedService

A fully resolved container service (preset or custom).
name
string
required
Service name (used as container name)
image
string
required
Docker image (e.g., 'postgres:17-alpine')
port
number
required
Container internal port
hostPort
number
required
Host port to expose
env
Readonly<Record<string, string>>
required
Environment variables for the container
healthcheck
string
required
Healthcheck command (e.g., 'pg_isready -U postgres')

LabLifecycle

Discriminated union representing lab runtime state.

TestRunState

Discriminated union representing test execution state.

TestAssertion

index
number
required
Assertion index in test suite
description
string
required
Assertion description
passed
boolean
required
Whether assertion passed

ContainerRuntime

binary
'podman' | 'docker'
required
Detected container runtime
version
string
required
Runtime version string

RuntimeState

View-layer state for container runtime detection.

Build docs developers (and LLMs) love