Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/fleet-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: fleet docs

# CI tier policy: see .github/ci-policy.md

# Build the fleet book (#13165): pkgs/fleet/book.toml + pkgs/fleet/book,
# rendered by the flake output .#fleet-docs (pkgs/fleet/docs.nix) — the
# same `nix build` locally and in CI, mirroring the mcpx book's build
# job in mcpx-docs.yml.
#
# This workflow only builds; it never deploys. A repository has exactly
# one GitHub Pages site and every Pages deployment replaces the whole
# site, so the fleet book is deployed by the mcpx-docs workflow's
# deploy job, staged under fleet/ with siteUrl "/code/fleet/" — a
# fleet-only deploy from here would wipe the mcpx book (and vice
# versa). See the book's "Deploying this book" chapter:
# pkgs/fleet/book/operations/deploying-this-book.md.

on:
push:
branches: [main]
workflow_dispatch:

permissions:
contents: read

jobs:
build:
name: "build: nix build .#fleet-docs"
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v7

- uses: DeterminateSystems/nix-installer-action@3138316df39ed29be04236d7ffc686fa525866aa # v23

- uses: DeterminateSystems/magic-nix-cache-action@84c0677f58dcedf3b91f8223ce36a9ea5b3c84b7 # v15
continue-on-error: true
with:
# Same cache posture as mcpx-docs.yml: no FlakeHub, the
# GitHub Actions cache is the cache.
use-flakehub: false
use-gha-cache: true

- name: Nix build
run: nix build .#fleet-docs --print-build-logs

# The nix result is a symlink into the store; copy it
# dereferenced so the staged tree is a plain static site.
- name: Stage site
run: |
rm -rf site
cp -rL result site
test -f site/index.html
23 changes: 23 additions & 0 deletions .github/workflows/mcpx-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,29 @@ jobs:
cp -rL result site
test -f site/index.html

# The fleet book (#13165, pkgs/fleet/book) shares this
# repository's single Pages site: a deployment replaces the
# whole site, so the fleet book is built with its own siteUrl
# and staged under fleet/ here, in the same deploy — a separate
# fleet-only deploy would wipe the mcpx book. Its build-only
# workflow is fleet-docs.yml; see the book's "Deploying this
# book" chapter (pkgs/fleet/book/operations/deploying-this-book.md).
- name: Nix build (fleet book, siteUrl /code/fleet/)
run: |
# Intentional: the single-quoted string in this block is a Nix expression
# evaluated by nix, not the shell -- ${builtins.currentSystem} in it is
# Nix's, and letting the shell expand it would break the build.
# shellcheck disable=SC2016
nix build --impure --print-build-logs --expr \
'(builtins.getFlake (toString ./.)).packages.${builtins.currentSystem}.fleet-docs.override { siteUrl = "/code/fleet/"; }' \
--out-link result-fleet-docs

- name: Stage fleet book into site/fleet
run: |
rm -rf site/fleet
cp -rL result-fleet-docs site/fleet
test -f site/fleet/index.html

- uses: actions/configure-pages@v6

- uses: actions/upload-pages-artifact@v5
Expand Down
2 changes: 2 additions & 0 deletions lib/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,7 @@ let
genericJsRuntime = pkgs.callPackage ../pkgs/generic-containers/js-runtime.nix { };
genericPythonRuntime = pkgs.callPackage ../pkgs/generic-containers/python-runtime.nix { };
mcpxDocs = pkgs.callPackage ../pkgs/mcpx/docs.nix { };
fleetDocs = pkgs.callPackage ../pkgs/fleet/docs.nix { };
mcpxRealServers = pkgs.callPackage ../pkgs/mcpx/real-servers.nix { };
idMailDeploy = pkgs.callPackage ../nixos/services/id-mail/worker/deploy.nix { };
pkarrDeploy = pkgs.callPackage ../pkgs/pkarr-worker/deploy.nix {
Expand Down Expand Up @@ -789,6 +790,7 @@ let
messageBridgeDeploy
;
mcpx-docs = mcpxDocs;
fleet-docs = fleetDocs;
mcpx-real-servers = mcpxRealServers;
mcpx-container = mcpxContainer;
identity-image = identityImage;
Expand Down
11 changes: 11 additions & 0 deletions pkgs/fleet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,17 @@ built-ins `fleet init`, `fleet session`, `fleet version`,
The per-domain `subcommands` arrays are the top-level command inventory rendered by `fleet <domain> --help`. The argument grammar and nested leaves live in the domain handlers and are documented in [`docs/verbs.md`](docs/verbs.md). That reference covers all shipped Fleet domains, top-level verbs, nested queue and agent commands, and where to ask a leaf for exact usage.

The queue client dispatches 32 top-level verbs, including `show`; grouped surfaces (`fallback`, `dispatch`, `session`, `surfaces`, `outbox`, and `stack`) document their nested commands and flags in the same reference. Before scripting an unfamiliar command, check `fleet capabilities` and the leaf's `--help`.
The same contract covers the book. [`book/`](book/) (mdBook sources,
`book.toml` at this package's root) is the complete, self-contained
reference for the binary — every domain, subcommand, flag, default and
operational procedure — and any change to a command, flag, default,
capability, surface or procedure updates the matching chapter in the
same change. The rule is recorded for agents in
[`doc/agents/documentation.md`](doc/agents/documentation.md) and in
the book's own "Keeping this book current" chapter. The book builds
with `nix build .#fleet-docs`; `create-missing = false` in
`book.toml` makes a missing chapter a build failure, never a stub.

Shipped examples — every verb below is dispatchable today:

```sh
Expand Down
18 changes: 18 additions & 0 deletions pkgs/fleet/book.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# mdBook configuration for the fleet book (#13165).
# The book root is pkgs/fleet itself so the sources stay next to the
# binary they document: plain markdown under book/, readable on GitHub
# exactly as written, and rendered as a book via the .#fleet-docs
# flake output (pkgs/fleet/docs.nix).
[book]
title = "fleet"
authors = ["developing-today"]
language = "en"
src = "book"

[build]
build-dir = "rendered"
# Every chapter in SUMMARY.md must exist on disk; never invent stubs.
create-missing = false

[output.html]
git-repository-url = "https://github.com/developing-today/code"
66 changes: 66 additions & 0 deletions pkgs/fleet/book/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Summary

<!-- id: book-summary since: pre-release -->

- [fleet](index.md)

- [Installation and bootstrap](getting-started/installation.md)
- [Quickstart](getting-started/quickstart.md)
- [The shape of the binary](getting-started/shape.md)

- [Architecture](concepts/architecture.md)
- [The queue: tasks, lanes and leases](concepts/queue.md)
- [Placement and remote dispatch](concepts/placement.md)
- [Secrets and the secrets broker](concepts/secrets.md)
- [The bridge: fleet messaging](concepts/bridge.md)
- [Agents: enrolment, doctor and the intake ladder](concepts/agents.md)
- [Proxy, sessions and recovery](concepts/proxy.md)
- [Search: the Atlas corpus](concepts/search.md)
- [The gh passthrough](concepts/gh.md)
- [Dispatch and dispatch-test](concepts/dispatch.md)

- [Built-in commands](reference/builtins.md)
- [fleet queue: core verbs](reference/queue-core.md)
- [fleet queue: lifecycle verbs](reference/queue-lifecycle.md)
- [fleet queue: the fallback queue](reference/queue-fallback.md)
- [fleet queue: dispatch and sessions](reference/queue-dispatch.md)
- [fleet queue: inspection and admin](reference/queue-admin.md)
- [fleet serve](reference/serve.md)
- [fleet proxy](reference/proxy.md)
- [fleet dispatch](reference/dispatch.md)
- [fleet dispatch-test](reference/dispatch-test.md)
- [fleet secrets](reference/secrets.md)
- [fleet gh](reference/gh.md)
- [fleet bridge](reference/bridge.md)
- [fleet agent](reference/agent.md)
- [fleet shell](reference/shell.md)
- [fleet search](reference/search.md)
- [fleet laptop-agent](reference/laptop-agent.md)

- [Tutorial: enrol a new seat](tutorials/enrol-a-seat.md)
- [Tutorial: claim and complete a queue task](tutorials/claim-and-complete.md)
- [Tutorial: dispatch a build remotely](tutorials/dispatch-a-build.md)
- [Tutorial: resolve a secret](tutorials/resolve-a-secret.md)
- [Tutorial: bridge messaging](tutorials/bridge-messaging.md)
- [Tutorial: run the brokers](tutorials/run-the-brokers.md)

- [The crates](library/crates.md)
- [The queue client](library/queue-client.md)
- [Placement and surfaces as data](library/placement.md)
- [Registry, config and capabilities](library/registry-and-config.md)

- [Repository layout](development/layout.md)
- [Building fleet](development/building.md)
- [Testing](development/testing.md)
- [Add a subcommand](development/add-a-subcommand.md)
- [Add a flag](development/add-a-flag.md)
- [Register a domain or capability](development/register-a-domain.md)
- [Release and rollout](development/release-and-rollout.md)
- [Keeping this book current](development/keeping-this-book-current.md)

- [Running the brokers as services](operations/services.md)
- [Health checks and the heal stack](operations/health-and-healing.md)
- [Troubleshooting](operations/troubleshooting.md)
- [Deploying this book](operations/deploying-this-book.md)
- [FAQ](operations/faq.md)
- [Glossary](operations/glossary.md)
Loading