-
Notifications
You must be signed in to change notification settings - Fork 1
Advanced k1s Development
This page is for developers working on WorkerBee and k1s together.
The common sibling layout is:
git/
k1s/
k1s-workerbee/
k1s-workerbee.wiki/
WorkerBee prefers the installed k1s-workerbee-runtime package. For source
development it can use a sibling k1s checkout:
export WORKERBEE_K1S_ROOT="$PWD/../k1s"
workerbee doctorIf the sibling checkout is on a development branch, keep the WorkerBee project name explicit or rely on the derived branch-scoped name so multiple branches can coexist.
From k1s-workerbee:
nix develop
python -m pip install -e ".[dev]"
workerbee doctorWithout Nix:
python3.11 -m venv .venv
. .venv/bin/activate
python -m pip install -U pip
python -m pip install -e ".[dev]"
workerbee doctorList profiles:
workerbee --runtime containerd profile listStart a profile against a sibling k1s checkout:
workerbee --runtime containerd profile start \
--profile k1s-dev-min-sqlite \
--k1s-root ../k1s \
--timeout 180Check profile state:
workerbee --runtime containerd profile status \
--profile k1s-dev-min-sqlite \
--k1s-root ../k1sStop and optionally purge:
workerbee --runtime containerd profile stop --k1s-root ../k1s
workerbee --runtime containerd profile stop --k1s-root ../k1s --purgeValidate profile startup:
workerbee --runtime containerd validate \
--scenario k1s-profile \
--profile k1s-dev-min-sqlite \
--k1s-root ../k1sValidate a workload on the profile:
workerbee --runtime containerd validate \
--scenario profile-workload \
--profile k1s-dev-min-sqlite \
--k1s-root ../k1s \
--timeout 240Through MCP, agents can use:
workerbee_v1_profile_listworkerbee_v1_profile_startworkerbee_v1_profile_statusworkerbee_v1_profile_validateworkerbee_v1_profile_workload_statusworkerbee_v1_profile_workload_validate
When the MCP daemon is running, profile dashboards and API shims are published under the project-scoped WorkerBee ingress. Example loopback hosts:
https://k1s.<project>.workerbee.localhost:19443/dashboard
https://k1s-api.<project>.workerbee.localhost:19443/healthz
In LAN mode, the same project hosts use the selected LAN base domain.
For sibling development, keep each active branch in its own worktree and let WorkerBee derive a project name from repo, branch, and path:
git -C ../k1s worktree add ../k1s-dev dev
git -C . worktree add ../k1s-workerbee-dev dev
cd ../k1s-workerbee-dev
export WORKERBEE_K1S_ROOT="$PWD/../k1s-dev"
workerbee mcp restartThis avoids state collisions between branches. Use workerbee projects and the
global dashboard to inspect which project belongs to which branch.
Focused unit tests:
python -m pytest tests/test_daemon.py tests/test_mcp_daemon.py tests/test_mcp_server.pyStyle:
ruff check .Live runtime tests require a local runtime and should be run deliberately after checking host state and cleanup output.