Skip to main content

Bosn

Bosn is a Rust daemon for safely managing Docker development applications. It keeps ownership, generation, volume, lease, execution-session, and event state in a durable SQLite registry. The daemon is the only component that mutates Docker or that writes that registry.

The distribution includes three intentionally thin front ends:

  • bosn, a bundled native CLI;
  • import bosn, a PyO3 client binding; and
  • bosn mcp, a stdio MCP server for Hermes and other MCP clients.

The former Python daemon, Docker front doors, manifest parser, and SQLite registry are deliberately not packaged. Python callers use bosn.Client; they cannot import or invoke a second lifecycle implementation.

Install

pip install bosn
bosn --version

Platform wheels contain the native bosn CLI and the bosn._native Python extension. Installing the wheel puts the bosn binary itself into the environment's scripts directory, so the bosn on PATH is the native CLI, with no Python wrapper in between. The extension uses PyO3's abi3-py310 ABI, so Bosn supports CPython 3.10 and newer with one platform wheel rather than publishing cp311-only artifacts.

One-file setup

Bosn accepts a local file or HTTPS URL for a versioned setup document. The document declares a digest-pinned image or inline Dockerfile, optional inline files, environment, bind mounts, named volumes, tmpfs mounts, and named tasks. Planning is inert; ensure and task submission are daemon-owned jobs.

version = 1

[app]
image = "registry.example/team/app@sha256:REPLACE_WITH_64_LOWERCASE_HEX_DIGEST"
command = "exec sleep 120"

[task.check]
command = "cargo check"
bosn setup plan --state-dir "$HOME/.local/state/bosn" \
  --workspace "$PWD" --config https://example.invalid/bosn-setup.toml \
  --refresh
bosn setup ensure --state-dir "$HOME/.local/state/bosn" \
  --workspace "$PWD" --config https://example.invalid/bosn-setup.toml \
  --refresh --deadline-ms 300000 --output-limit 8388608

online_refresh is explicit; offline_cache_only uses only a previously validated local cache record. URLs with credentials, unsupported schemes, path traversal, unpinned images, and oversized documents are refused.

Python

from pathlib import Path
import bosn

client = bosn.Client(Path.home() / ".local/state/bosn")
plan = client.plan_setup(
    Path.cwd(), "https://example.invalid/bosn-setup.toml", policy="online_refresh"
)
job_id = client.submit_setup_ensure(
    Path.cwd(),
    "https://example.invalid/bosn-setup.toml",
    policy="online_refresh",
    deadline_ms=300_000,
    output_limit=8 * 1024 * 1024,
)

The binding exposes typed request and observation operations only. It does not accept Docker command arguments, container identifiers, mounts, or arbitrary commands from callers.

Concurrent runs

The daemon runs task jobs (bosn run --task ...) from different checkouts in parallel, max(1, ncpu * 2) runner slots by default, each limited to 4 CPUs. Stack ensures run in their own lane, so they never wait behind long tasks. bosn jobs (or the bosn_jobs MCP tool) shows what is running, in which slot, with which containers and caches. A task that goes silent is torn down, and a daemon restart reaps what its predecessor left running. For stacks that drive the host Docker engine (act), a per-job proxy labels, limits, isolates and removes the job's containers, and maps cache volumes into act's job containers. See docs/runners.md.

The daemon starts on demand and exits after 10 idle minutes (BOSN_DAEMON_IDLE_EXIT_SECS, 0 to keep it), so the next command always runs the current release; containers and the registry survive the exit. Any command that reaches a daemon of another release warns bosn daemon/client mismatch on stderr.

bosn jobs                                  # what is running now
bosn daemon serve --state-dir "$HOME/.local/state/bosn" --runner-slots 8 --runner-cpus 4

MCP / Hermes

Run bosn mcp over stdio. A typical Hermes registration is:

mcp_servers:
  bosn:
    command: bosn
    args: [mcp]

Set BOSN_STATE_DIR if the default state directory is not appropriate. MCP tools use the same typed daemon operations as the CLI and Python client; long operations return durable job IDs.

Development

./install
./lint
./test

./install prepares Soldr and the Rust toolchain pinned by rust-toolchain.toml before installing the native package. Source builds use Soldr for both the CLI and Maturin's compiler calls. The declared Docker test and lint tasks build a wheel against a read-only checkout, with writable target, toolchain and environment volumes.

The Rust migration status, native manifest lifecycle boundary, and registry details are documented in docs/migration-rust.md, docs/rust-manifest-runtime.md, and docs/rust-registry.md. Daemon-owned task secrets (an opt-in GITHUB_TOKEN for act runs) are in docs/task-secrets.md; the read-only GitHub API proxy that keeps the token out of containers is in docs/github-api-proxy.md. Bosn runs its containers at low CPU priority so the desktop stays responsive; see docs/cpu-priority.md. Local CI on an isolated, daemon-owned engine (bosn ci run, with reports and stable exit codes for agents) is in docs/ci.md.

Before pushing this repository, run its gate from a clean, committed checkout:

uvx --from git+https://github.com/zackees/ci.yml@86b63937960d00655f7ef3752ef6f15b6b06f35b ci-lint local-gate run

The heavy lanes require Bosn 0.1.12 or later and replay the Rust checks and Linux test tier through act2 on isolated engines. The gate checks the executed source and required successful steps before stamping the commit. Unchanged lane inputs can reuse a recorded pass; compiler units are cached across runs.

PR verification refuses missing or stale proof. A trusted, attested PR can skip the mapped policy and Rust jobs, with audit sampling retained. Explicit ci-test/ci-full requests keep their Linux test-tier coverage; main pushes and release validation retain their remote checks.

If the gate rejects an old Bosn before submitting a run, check bosn --version and the executable selected by command -v bosn. The gate requires at least 0.1.12. Its uv run --no-project --isolated launchers avoid selecting a virtual environment in an ancestor directory: --no-project alone does not isolate the tooling environment. Make the supported executable available on PATH and rerun the gate; the rejected preflight produces no attestation.

Metadata

Release files for bosn 0.1.29

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for bosn 0.1.29
File Actions
bosn-0.1.29-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for bosn-0.1.29-cp310-abi3-win_amd64.whl
bosn-0.1.29-cp310-abi3-manylinux_2_39_x86_64.whl CPython 3.10 abi3 Linux glibc 2.39+ x86-64 Details for bosn-0.1.29-cp310-abi3-manylinux_2_39_x86_64.whl
bosn-0.1.29-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for bosn-0.1.29-cp310-abi3-macosx_11_0_arm64.whl
bosn-0.1.29-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details for bosn-0.1.29-cp310-abi3-macosx_10_12_x86_64.whl

Total release size: 59.7 MB

Release files / bosn-0.1.29-cp310-abi3-win_amd64.whl

Download URL bosn-0.1.29-cp310-abi3-win_amd64.whl
Size 13.6 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
0163433d32ac82cfb72463d1d43325a4fa224c51263996000b12a4fe96763241
BLAKE2b-256 checksum
How to use checksums
4cf5c1ae93a63728ca01cde5f5c6b5983f98fc26ef25c9e4321558dba2be86ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Release files / bosn-0.1.29-cp310-abi3-manylinux_2_39_x86_64.whl

Download URL bosn-0.1.29-cp310-abi3-manylinux_2_39_x86_64.whl
Size 19.8 MB
Tags CPython 3.10 Linux glibc 2.39+ x86-64 abi3
SHA-256 checksum
How to use checksums
a25576e8bbb85e83c4de15b31c8fd4cc9ae9361343c5c9f0229178f99eca0ea4
BLAKE2b-256 checksum
How to use checksums
6f8a81cddaa33382547dab607c1c1059bacfe33cc5c7b4fc3954ea27a1d9a11b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Release files / bosn-0.1.29-cp310-abi3-macosx_11_0_arm64.whl

Download URL bosn-0.1.29-cp310-abi3-macosx_11_0_arm64.whl
Size 12.9 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ed84160eb3a368e2c8ec8115f7eac859e3a3965b3166796c7c0b014509106385
BLAKE2b-256 checksum
How to use checksums
b7a394b6273ee5b56fbb801ca20a0d9783f5ff5b32b8c9f0b055fe1cdd0f4e12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Release files / bosn-0.1.29-cp310-abi3-macosx_10_12_x86_64.whl

Download URL bosn-0.1.29-cp310-abi3-macosx_10_12_x86_64.whl
Size 13.3 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
a7a330e04af7cf5e05c8a13bd6c6a20f2b2c29e409d1759de1ac324f5cd5c844
BLAKE2b-256 checksum
How to use checksums
c82c909f5c5c5856a01672c15409c32825addb32a6e38c16d949439d6156536d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Security for bosn 0.1.29

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 4 files in this release have been uploaded with provenance metadata.

Select from 4 files

Attestation for bosn-0.1.29-cp310-abi3-win_amd64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.29 This release

4 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page