Skip to content
6 changes: 6 additions & 0 deletions changelog.d/feature-waitlists.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
### Join Darkbloom's waitlists with `darkbloom waitlist`; sandbox setup waits for approval

- `darkbloom waitlist` lists every waitlist the coordinator offers (`GET /v1/waitlists` on the coordinator of `provider.toml`, with the `darkbloom login` token) and where your account stands on each: not joined, your place in line, approved (with the command that starts the feature) or not approved. The coordinator offers waitlists for clusters and Darkbloom Sandbox; a waitlist it adds later appears without a CLI update, and every line takes the waitlist's title and start command from the coordinator.
- `darkbloom waitlist cluster` and `darkbloom waitlist sandbox` put your account on that waitlist (`POST /v1/waitlists/{feature}` with `{}`) and show where it stands, with the start command once approved. A waitlist is per account, not per Mac: joining sends nothing about the Mac. Running it again keeps your place, and an approved or revoked account stays as it is; a revoked account's join exits 1. An unknown name lists the waitlists there are and exits 1. `--json` prints the coordinator's answer.
- A first `darkbloom sandbox setup` now checks that Darkbloom approved the account from the Darkbloom Sandbox waitlist before it checks or installs anything. Not on the waitlist: setup offers to join it (`--yes` joins); waitlisted, revoked, not logged in or without a usable answer from the coordinator: setup says so and exits 1. A coordinator without waitlists (404) lets setup go on, and a setup that continues, repairs or updates an installed add-on does not ask.
- The cluster commands are unchanged: `darkbloom waitlist cluster` records the request, and `darkbloom cluster` does not check it.
108 changes: 98 additions & 10 deletions docs/provider/cli-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,15 @@ Subcommands declared by `Darkbloom.configuration.subcommands`:
| `schedule` | Edit, show or disable saved weekly availability and startup loading; never start/stop the service | ✓ | `Scheduling/ScheduleCommand.swift` (`AvailabilitySchedule`) |
| `switch` | Gracefully replace hosted models in the running coordinator-connected provider, without restart or reconnect | | `SwitchCommand.swift` (`Switch`) |
| `addon` | Debug add-on holds on the running provider: `status` (default), `hold`, `release` | | `AddonCommand.swift` (`Addon`) |
| `sandbox` | Set up and manage [Darkbloom Sandbox](./sandboxes.md) CI jobs through its add-on: status (bare), `setup`, `pause`, `resume`, `logs`, `uninstall` | | `Sandbox/SandboxCommand.swift` (`Sandbox`) |
| `sandbox` | Set up and manage [Darkbloom Sandbox](./sandboxes.md) CI jobs through its add-on: status (bare), `setup`, `pause`, `resume`, `logs`, `uninstall`; `setup` requires an approval from the [Darkbloom Sandbox waitlist](#darkbloom-waitlist) | | `Sandbox/SandboxCommand.swift` (`Sandbox`) |
| `stop` | Drain accepted requests, then stop the LaunchAgent; `--uninstall` removes the provider, watchdog and desktop API agents | | `StopCommand.swift` (`Stop`) |
| `restart` | Drain, restart with recorded configuration, and confirm fresh authorization | ✓ | `RestartCommand.swift` (`Restart`) |
| `status` | Config, hardware, schedule, live daemon state (including the coordinator's last `Trust: <level> / <status>` message), per-slot KV/MTP posture | ✓ | `StatusCommand.swift` (`Status`) |
| `doctor` | Diagnostics (see [troubleshooting](./troubleshooting.md#doctor-checks)) | ✓ | `DoctorCommand.swift` (`Doctor`) |
| `models` | `list`, `catalog`, `download`, `remove` | ✓ | `ModelsCommand.swift` (`Models`) |
| `local` | Print the direct-mode endpoint and API key | | `LocalCommand.swift` (`Local`) |
| `cluster` | Set up two Macs to serve one model together ([guided setup](./two-mac-cluster.md)); `cluster local` serves without a coordinator | ✓ | `ClusterCommand.swift` (`Cluster`) |
| `waitlist` | List the waitlists the coordinator offers and where the account stands (bare), or put the account on one and show where it stands (`waitlist cluster`, `waitlist sandbox`); waitlists are per account | ✓ | `Waitlist/WaitlistCommand.swift` (`Waitlist`) |
| `login` | Link the machine to an account (RFC 8628 device code) | ✓ | `LoginCommand.swift` (`Login`) |
| `logout` | Stop the provider, revoke its current saved token, then remove the local credential | ✓ | `LogoutCommand.swift` (`Logout`) |
| `benchmark` | Inference benchmarks and harnesses | ✓ | `BenchmarkCommand.swift` (`Benchmark`) |
Expand Down Expand Up @@ -1084,21 +1085,38 @@ darkbloom sandbox uninstall [--yes]

### Setup

1. **Check.** Refuses `sudo`, then prints chip, macOS, desktop session,
network, power and sleep in the `doctor` style (`[PASS]`, `[WARN]` with a
`↳ fix:` line, `[FAIL]`). A refusal (table below) prints `Not eligible` and
stops before anything is downloaded
1. **Waitlist.** Setup refuses `sudo`. A first setup then asks the coordinator of `provider.toml`
whether Darkbloom approved this account from the `sandbox` waitlist
(`GET /v1/waitlists/sandbox` with the `darkbloom login` token) before it
checks or installs anything. Approved, or a coordinator without that
waitlist (it answers `404`, as one without waitlists does): setup goes on.
Not on the waitlist: setup offers to join it (`--yes` joins without asking)
as [`darkbloom waitlist sandbox`](#darkbloom-waitlist) does, with the body
`{}`, and then treats the join's answer the same way; declined, or without
a terminal and without `--yes`, it prints the join command and stops.
Waitlisted or revoked: setup shows the status and stops. Not logged in
(`401`): setup says to run `darkbloom login` and stops. No usable answer
(unreachable, or any other answer): setup says why and stops. Its lines
name the waitlist by the coordinator's `title`, and `Darkbloom Sandbox`
when there is no answer. Each stop exits `1`; a setup that continues,
repairs or updates an installed add-on does not ask
(`provider-swift/Sources/darkbloom/Sandbox/SandboxSetupCommand.swift`,
`SandboxSetupFlow.requireApproval`).
2. **Check.** Prints chip, macOS, desktop session, network, power and sleep
in the `doctor` style (`[PASS]`, `[WARN]` with a `↳ fix:` line, `[FAIL]`). A
refusal (table below) prints `Not eligible` and stops before anything is
downloaded
(`provider-swift/Sources/darkbloom/Sandbox/SandboxEligibility.swift`,
`SandboxEligibility`; measurements in `SandboxHostProbe`).
2. **Download.** Downloads `<server>/install.sh` over HTTPS: a redirect is
3. **Download.** Downloads `<server>/install.sh` over HTTPS: a redirect is
followed only to another `https` URL, and the response must be HTTP 200 over
`https`, at most 1 MiB, with a `#!` first line naming a shell. The script is
written as a `0600` file in a new `0700` directory, run with `/bin/sh` for
the plan and the install, and removed afterwards. The installer verifies the
add-on release before it installs it; the CLI does not verify the script
beyond TLS (`provider-swift/Sources/darkbloom/Sandbox/SandboxInstaller.swift`,
`SandboxInstaller`).
3. **Plan.** A script that names `--plan` (add-on 1.1.1 and later) runs with
4. **Plan.** A script that names `--plan` (add-on 1.1.1 and later) runs with
`--plan --json-progress` and the owner's slot options, without `--yes` and
with stdin closed. It verifies the release, runs the add-on's own checks and
sizing, installs nothing and prints one
Expand Down Expand Up @@ -1131,17 +1149,17 @@ darkbloom sandbox uninstall [--yes]
images and one Linux job: 1 Linux job, no macOS job. When no job fits, the
verdict gives the plan's message and the GiB to free for one Linux job and
for one macOS job, and setup stops before installing.
4. **Confirm.** Explains that inference pauses while a job runs, that each job
5. **Confirm.** Explains that inference pauses while a job runs, that each job
pays its price minus a 10% fee into the Darkbloom balance, the VM images and
the one browser approval, then asks `[y/N]`. `--yes` skips it; without a
terminal and without `--yes`, setup stops before installing.
5. **Install.** A script that names `--json-progress` runs with
6. **Install.** A script that names `--json-progress` runs with
`--json-progress --yes` and the owner's `--no-browser`, `--wait-ready` and
slot options, with stdin closed, and its stages render as
[progress events](#installer-progress-events). Any other script is an older
installer: it runs with the terminal and only the slot options, and the CLI
says so.
6. **Summarize.** Reads `status --json` again: the state, the jobs at a time and
7. **Summarize.** Reads `status --json` again: the state, the jobs at a time and
the next commands.

While the installer runs, Ctrl-C reaches the installer, not the CLI, and setup
Expand Down Expand Up @@ -1266,6 +1284,76 @@ the option or action: `status` then shows the add-on's own `status` output,
`pause` and `resume` say to update it with `setup`, and `darkbloom status` says
it is installed.

## `darkbloom waitlist`

Darkbloom opens some features, such as clusters and Darkbloom Sandbox, to the
accounts it approves from a waitlist per feature. A waitlist is per account:
the account joins it and Darkbloom approves the account, not a Mac, so a join
sends nothing about this Mac. The coordinator's catalog is the only list of
waitlists: the CLI asks it which waitlists exist and takes each one's title and
start command from its answer. Bare `darkbloom waitlist` lists every waitlist
and where the account stands; `darkbloom waitlist <name>`, such as
`darkbloom waitlist cluster` or `darkbloom waitlist sandbox`, puts the account
on one and shows where it stands. Admins approve accounts on the coordinator.
Code:
`provider-swift/Sources/darkbloom/Waitlist/WaitlistCommand.swift`
(`Waitlist`, `FeatureWaitlistCommand`, `FeatureWaitlistAccess`),
`provider-swift/Sources/darkbloom/Waitlist/FeatureWaitlist.swift`
(`FeatureWaitlistClient`, `FeatureWaitlists`, `FeatureWaitlistPlace`) and
`provider-swift/Sources/darkbloom/Waitlist/FeatureWaitlistView.swift` (`FeatureWaitlistView`).

```bash
darkbloom waitlist [--json] [--config <path>]
darkbloom waitlist <name> [--json] [--config <path>]
```

| Argument / flag | Default | Effect |
|---|---|---|
| no `<name>` | — | Every waitlist in the coordinator's order: its title and id, its summary and where the account stands (`not joined`, `#<n> in line`, `approved since <day>` with the start command, `not approved`), then `Join one: darkbloom waitlist <name>` while one is not joined |
| `<name>` | — | Puts the account on that waitlist, then shows where it stands: its place in line, or the approval with the waitlist's start command. Joining again keeps the place, and an approved or revoked account stays as it is; a revoked account's join exits `1`. The name is a waitlist's id ignoring case, or that id with a plural `s` or `es` (`clusters`, `sandboxes`); an exact id wins over another id's plural, and a plural that two ids share names neither. An unknown name prints the waitlists there are and exits `1` without joining |
| `--json` | `false` | The coordinator's answer as JSON, times in ISO 8601: `{"data": [...]}` without a name, else the waitlist's entry the join answered |
| `--config`, `-c` | the default `provider.toml` | Which coordinator to ask (`[coordinator] url`) |

```text
Clusters (cluster): not joined
Serve one model with two to four of your Macs.

Darkbloom Sandbox (sandbox): #3 in line (joined Oct 29, 2026)
Run Darkbloom Sandbox CI jobs on your Mac.

Join one: darkbloom waitlist <name>
```

| Status | Shown |
|---|---|
| `none` | Not on the waitlist, and the command that joins it |
| `waitlisted` | `#<n> in line` and the day it joined; Darkbloom reviews accounts in the order they joined |
| `approved` | Approved since the day of the decision, and the waitlist's `start_command` when it has one; a leading `darkbloom` becomes the installed command, such as `darkbloom-dev` |
| `revoked` | Revoked on the day of the decision; joining again does not restore it |

A waitlist's entry is
`{feature, title, summary?, start_command?, status, position?, requested_at?, decided_at?}`;
other fields are ignored, and `--json` leaves them out.
Every sentence names the waitlist by its `title`; an entry without one is
unreadable. A control, format or line-separator character in the
coordinator's text (a title, summary, start command or refusal message, such
as an escape sequence or a bidirectional override) prints as `�`, and
`--json` writes it as a `\u` escape, so that text cannot drive the terminal.
The list makes one `GET /v1/waitlists` call; `darkbloom waitlist <name>` reads
the list to find the waitlist, then sends `POST /v1/waitlists/{feature}` with
the body `{}`: no chip, memory or Mac count.
The requests go to the coordinator of `provider.toml` with the token of
`darkbloom login` as a Bearer credential. Only an `https` coordinator, or plain
`http` to this Mac's loopback, is asked; no redirect is followed, a call ends
after 10 seconds and an answer over 64 KiB is refused. When the coordinator
answers `401` (no token, or one it does not take), the command says to run
`darkbloom login` and exits `1`. A coordinator without waitlists answers `404`,
with or without a token: the command says there is nothing to join there and
exits `1`. Another status exits `1` with that status and its message; an
unreadable answer, or none at all, exits `1` with the reason.
[Darkbloom Sandbox setup](#setup) requires an approved `sandbox` entry;
`darkbloom cluster` itself does not check the cluster waitlist.

## `darkbloom stop`

Drain accepted requests and their terminal usage before persistently stopping
Expand Down
43 changes: 35 additions & 8 deletions docs/provider/sandboxes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Host Darkbloom Sandbox CI jobs

> Last updated: 2026-11-02
> Last updated: 2026-11-03

How to let this Mac run Darkbloom Sandbox jobs, approved GitHub Actions jobs in
Linux and macOS virtual machines, beside the inference provider: set it up,
Expand All @@ -18,15 +18,29 @@ into your Darkbloom balance.
you. The first job of a platform also needs that platform's VM images
(Linux 4 GiB, macOS 46 GiB, nothing once installed). Each Linux job needs a
30 GiB scratch disk and each macOS job 40 GiB.
- A Darkbloom account that Darkbloom approved to host sandboxes. An account not
approved yet joins a waitlist, and the Mac enrolls once it is approved.
- A Darkbloom account that Darkbloom approved for Darkbloom Sandbox from its
waitlist, and this Mac linked to it with `darkbloom login`. `darkbloom sandbox
setup` installs nothing until the account is approved (step 1).
- The Mac plugged in, never sleeping on its power adapter, and logged in at the
desktop, where the add-on runs. Ethernet works better than Wi-Fi.
- Outbound HTTPS to `api-sandbox.darkbloom.dev`.

## Steps

1. Check this Mac and set it up:
1. Join the Darkbloom Sandbox waitlist, then wait for Darkbloom to approve your
account:

```bash
darkbloom waitlist sandbox
```

The waitlist is for your account, not for this Mac: the command puts your
account on it, sending nothing about this Mac, and prints your place in line.
Run it again to see where you stand; it keeps your place. Darkbloom reviews
accounts in the order they joined. `darkbloom sandbox setup` also offers to
join when your account is not on the waitlist, and stops until it is approved.

2. Check this Mac and set it up:

```bash
darkbloom sandbox setup
Expand All @@ -45,16 +59,16 @@ into your Darkbloom balance.
To choose the number of jobs, add `--linux-slots <n>` and `--macos-slots <n>`;
`--macos-slots 1` keeps one of macOS's two macOS VMs for your own use.

2. Approve this Mac in your browser. The installer opens the approval page with
3. Approve this Mac in your browser. The installer opens the approval page with
the code filled in, and setup prints the link and code as well. Sign in with
the Darkbloom account that should receive the earnings and approve. Your
`darkbloom login` session cannot approve a Mac. To approve from another
device, add `--no-browser` to step 1 and open the printed link there.
device, add `--no-browser` to step 2 and open the printed link there.

3. Let the VM images download. After enrollment the add-on starts and downloads
4. Let the VM images download. After enrollment the add-on starts and downloads
its VM images in the background, the sizes setup showed under Disk. The Mac
takes jobs once an image is installed. To keep setup open until then, add
`--wait-ready` to step 1.
`--wait-ready` to step 2.

## Verify

Expand Down Expand Up @@ -84,6 +98,18 @@ state, continues an unfinished setup or repairs the add-on.

## Troubleshooting

- **`You're on the Darkbloom Sandbox waitlist: #N in line`** (setup exits 1).
Darkbloom has not approved your account for Darkbloom Sandbox yet; nothing
was installed. Run setup again once `darkbloom waitlist sandbox` says your
account is approved.
- **`Link this Mac to your Darkbloom account first`**. The waitlist needs your
account: run `darkbloom login`, then setup again.
- **`Darkbloom revoked your account's access to Darkbloom Sandbox`**. Joining
again does not restore it; contact Darkbloom.
- **`Could not reach the Darkbloom Sandbox waitlist at …`** (setup exits 1).
Setup could not learn whether your account is approved, so it checked and
installed nothing. Fix the reason it names, such as this Mac's connection,
then run setup again.
- **`Free up N GiB of disk for one Linux job`.** No job fits in the free disk.
The disk rules are under [Prerequisites](#prerequisites). Free the space it
names, then run setup again.
Expand All @@ -110,5 +136,6 @@ state, continues an unfinished setup or repairs the add-on.
## Related

- [CLI reference: `darkbloom sandbox`](./cli-reference.md#darkbloom-sandbox): flags, eligibility rules and the installer and add-on contracts
- [CLI reference: waitlists](./cli-reference.md#darkbloom-waitlist): the waitlist commands and the request they make
- [Add-on hold](../architecture/addon-hold.md): how the provider pauses inference for jobs
- [Configuration](../reference/configuration.md#darkbloom-sandbox-cli): bounds and the test override
18 changes: 18 additions & 0 deletions docs/provider/two-mac-cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,24 @@ Remote Login, no IP address and no network setting is typed anywhere.
cable; a catalog model neither Mac has is downloaded once on the leader, then
copied ([Models](#models) below).

## The cluster waitlist

Darkbloom approves accounts for clusters from a waitlist. The waitlist is for
your account, not for each Mac: join it once, from either Mac linked to your
account with `darkbloom login`:

```bash
darkbloom waitlist cluster
```

It puts your account on the waitlist, sending nothing about your Macs, and
prints your place in line; Darkbloom reviews accounts in the order they joined
and approves them by hand. Run it again to see where you stand: it keeps your
place, and once you are approved it says so and names the command that starts
a cluster. `darkbloom waitlist` alone lists every waitlist and where you stand
on each. `darkbloom cluster` itself works as before. Details:
[CLI reference: waitlists](./cli-reference.md#darkbloom-waitlist).

## The steps, once

Run `darkbloom cluster` on each Mac, pick a model, done. The Mac you start on
Expand Down
1 change: 1 addition & 0 deletions provider-swift/Sources/darkbloom/Darkbloom.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ struct Darkbloom: AsyncParsableCommand {
Watchdog.self,
RuntimeSmoke.self,
Cluster.self,
Waitlist.self,
Desktop.self,
]
)
Expand Down
Loading
Loading