Skip to content
Merged
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ Put OpenCode (or Hermes) on this Mac's own models:
```bash
curl -fsSL https://api.darkbloom.dev/install.sh | bash
exec $SHELL -l # or open a new Terminal window, so your shell finds darkbloom
darkbloom start --opencode # or --hermes
darkbloom --opencode # or --hermes
```

`start` asks how this Mac serves: **Only me**, **Darkbloom network** or
It asks how this Mac serves: **Only me**, **Darkbloom network** or
**Both, me first**. Press Enter for Both, me first: it asks which models to
serve, serves them in the background and sets OpenCode up. Only me serves the
models already on this Mac, in that Terminal window. Darkbloom network gives
OpenCode no address on this Mac. Then, in OpenCode, `/models` → Darkbloom. Two
Macs: run `darkbloom cluster` on each, then `darkbloom start --opencode` on the
Macs: run `darkbloom cluster` on each, then `darkbloom --opencode` on the
leading Mac.

<!-- pending LS-1: Only me also asks which models to serve, and serves them in the background. -->
Expand Down
11 changes: 11 additions & 0 deletions changelog.d/darkbloom-opencode-hermes-shortcuts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
### `darkbloom --opencode` and `darkbloom --hermes`

- `darkbloom --opencode` is `darkbloom start --opencode`, and `darkbloom --hermes` is `darkbloom start --hermes`;
both together work too. Any other `start` option goes with them, in any order (`darkbloom --opencode --me-first`,
`darkbloom --me-first --opencode`), and `start`'s errors and refusals apply. `darkbloom start --opencode` keeps
working; `--help`, `--version`, plain `darkbloom` and every subcommand are unchanged, and a mistyped flag
(`darkbloom --opencod`) gets the usual unknown-option error.
- `darkbloom --help` shows the two shortcuts, one line each.
- The lines that name the command say the short form: `darkbloom local`'s `tools:` line, the line `--port` prints
when it replaces a saved port, the refusals, the tool step's lines, the installer's closing lines, and the comment
above the `darkbloom` block in OpenCode's and Hermes' configs (a config set up before keeps its line).
12 changes: 6 additions & 6 deletions changelog.d/install-next-start-opencode.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
### The installer ends with `darkbloom start --opencode`
### The installer ends with `darkbloom --opencode`

- The installer's last lines say that `darkbloom start` asks how this Mac serves (Only me, Darkbloom network, or
Both, me first), that `--opencode` then sets OpenCode up (`/models` → Darkbloom; `--hermes` for Hermes), and that
two Macs pair with `darkbloom cluster` on each. The last line is the command to run next, with its full path so it
works before the shell picks up the new `PATH` line: `Next: ~/.darkbloom/bin/darkbloom start --opencode`. Before, it
listed `doctor`, `models catalog`, `models download`, `login` and `start`.
- The installer's last lines say that `darkbloom --opencode` asks how this Mac serves (Only me, Darkbloom network, or
Both, me first), then sets OpenCode up (`/models` → Darkbloom; `darkbloom --hermes` for Hermes), and that two Macs
pair with `darkbloom cluster` on each. The last line is the command to run next, with its full path so it works
before the shell picks up the new `PATH` line: `Next: ~/.darkbloom/bin/darkbloom --opencode`. Before, it listed
`doctor`, `models catalog`, `models download`, `login` and `start`.
- `curl … | bash` prints these lines once the platform's copy of the installer is updated.
2 changes: 1 addition & 1 deletion changelog.d/local-one-port-per-mac.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

- Every local API this Mac serves takes the same port: Only me and Both, me first from the start question, a saved choice, `--me-first`, `--local`, `--local-endpoint` and the Darkbloom app's starts, its local mode included. The first one saves it as `[local] port`, and every later start uses it, so the address your tools were given (`http://127.0.0.1:<port>/v1`, with the key in `~/.darkbloom/local_token`) never moves. Before, `--local`, `--local-endpoint` and the app took 8000 while the start question took 8001.
- A Mac whose local API already serves keeps that port and saves it: the running API's port, else the one its installed background service serves on. A Mac updated from 0.10.10, whose local API serves on 8000 (the app's setup, "Alongside the network", "Local only", `--local-endpoint`, `--local`), keeps 8000: ``Local API port: 8000 (saved; this Mac's local API already uses it).`` Only a Mac with no local API at all takes the first free port from 8001, never 8000 or 47420–47423.
- A saved port always wins, and is never moved. `--port <n>` replaces it and is saved too: ``Local API port: 8007 (saved, instead of 8005: tools set up for 8005 need `darkbloom start --opencode` or `--hermes` again).``
- A saved port always wins, and is never moved. `--port <n>` replaces it and is saved too: ``Local API port: 8007 (saved, instead of 8005: tools set up for 8005 need `darkbloom --opencode` or `--hermes` again).``
- A Mac without `[local]` started without a terminal still serves exactly as before: the Darkbloom network, with no local API and no port.
- When the local API of Both, me first can't listen, `darkbloom status` no longer reads "Darkbloom network only": it says ``Serving: Darkbloom and you, me first — the local API isn't up: port 8001 is in use (`darkbloom start --port 8002`)``, and `darkbloom local` says the same. Only me names the next free port the same way. On a Mac in a two-Mac cluster these lines name `darkbloom start --solo --port <n>`, or `darkbloom restart` for the pair's own API.
- The app's local mode runs as launchd's `--foreground` service on that port, saves a new port only once the service started, and its log no longer shows the local key.
4 changes: 2 additions & 2 deletions changelog.d/opencode-hermes-integrations.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
### OpenCode and Hermes: the config writers for `start --opencode` and `--hermes`
### OpenCode and Hermes: the config writers for `--opencode` and `--hermes`

- The writers that make OpenCode 2 and Hermes Agent ready to use Darkbloom as a provider, called by
`darkbloom start --opencode` / `--hermes`.
`darkbloom --opencode` / `--hermes`.
- OpenCode gets a `providers.darkbloom` block in its global `opencode.jsonc` (or an existing `opencode.json`): the
local endpoint at its live port from `local.json`, the models with their names, context and output limits and
capabilities, and `max_tokens` as the output-cap field (OpenCode otherwise sends `max_completion_tokens`, which the
Expand Down
2 changes: 1 addition & 1 deletion changelog.d/paired-mac-start-starts-the-pair.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
- The desktop app's **Start serving** has no `--solo`, so on a paired Mac it now starts the pair, as a plain `darkbloom start` does, in every state of the pair. It never serves that Mac alone and never waits for an answer. The pair serves its own model: when the app named another, the start ends with ``This Mac serves in a pair: started the pair with <the pair's model>; `darkbloom cluster` changes its model.``, which the app shows. Since 0.10.9 it served the Mac alone while the pair didn't run there, and was refused while the pair ran.
- The lines that name the way back now say `darkbloom start` for the pair and `darkbloom start --solo` for serving alone: `darkbloom status` for a part that stopped because the other Mac stopped answering, the `Next:` line of `cluster status`, `restart` on a Mac where nothing serves, and the line `start --solo` prints. They no longer send you to `darkbloom cluster` to start the pair.
- `darkbloom start --solo`, `restart` and `update` on a Mac with a leftover part of the pair now say that its saved start is cleared only once it is. They first say that they are stopping the leftover part. If a cluster command is running, they wait for it; when it is still running after 10 minutes, nothing is stopped or cleared, and they no longer say it was.
- No start asks a question without a terminal. On pair-2, a `darkbloom start --opencode` that got no answer waited forever on "Serve on this Mac alone / Start the pair"; that question is gone. On a paired Mac, a start without a terminal, with or without `--opencode` or `--hermes`, starts the pair and reads nothing. Where a start can't go on without asking, it says in one line what to add.
- No start asks a question without a terminal. On pair-2, a start with `--opencode` that got no answer waited forever on "Serve on this Mac alone / Start the pair"; that question is gone. On a paired Mac, a start without a terminal, with or without `--opencode` or `--hermes`, starts the pair and reads nothing. Where a start can't go on without asking, it says in one line what to add.
- A start for **Darkbloom network** or **Both, me first** that names no models (`--model <id>`, `--all`) can't pick them without a terminal. On any Mac it now says so in one line and stops (exit 64), before anything is stopped or started, instead of printing the numbered model list and waiting for an answer that may never come. **Only me** serves the models already on the Mac and is unchanged.
- `darkbloom status` on a paired Mac now says plainly when the Mac serves alone instead of the pair: a line under the pair's block names single-Mac serving and its process, and its own `Daemon:`, `Serving:` and `Trust:` lines follow. Before, it said only "Single-Mac serving: running beside the pair" at the end, and the `Serving:` line needed `status --solo`.
6 changes: 3 additions & 3 deletions changelog.d/start-opencode-hermes.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
### `darkbloom start --opencode` and `--hermes`
### One flag sets OpenCode or Hermes up: `--opencode` and `--hermes`

- One flag sets OpenCode 2 or Hermes Agent up to use Darkbloom, as `ollama launch` and `omlx launch` do:
`darkbloom start --opencode`, `--hermes`, or both. If this Mac's local API already runs, nothing restarts; otherwise
`start` runs as usual and the tools are set up once its local API answers.
`darkbloom --opencode`, `darkbloom --hermes`, or both. If this Mac's local API already runs, nothing restarts;
otherwise `start` runs as usual and the tools are set up once its local API answers.
- It prints the file it changed, the backup and a one-line undo, then where your requests go and the two variables
other OpenAI clients need (naming the key file, never the key). No line, and no tool file, holds the key.
- A Hermes older than v0.20.2 is set up with one warning line: it can't read the key until `hermes update`.
Expand Down
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Darkbloom Provider Documentation

> Last updated: 2026-11-07
> Last updated: 2026-11-08

This repository documents the Swift provider, local native inference and
landing. Backend, console and admin source, development and operating guides
Expand All @@ -9,7 +9,7 @@ belong to

## Operate A Provider

- [Quickstart](provider/quickstart.md): install, then `darkbloom start --opencode` for OpenCode or Hermes on this Mac's own models
- [Quickstart](provider/quickstart.md): install, then `darkbloom --opencode` for OpenCode or Hermes on this Mac's own models
- [Use your Mac yourself, first](provider/local-first.md): Only me, Darkbloom network, or Both, me first; what each runs, costs and earns, and switching
- [The local API](provider/direct-mode.md) for any OpenAI client, and [network self-route](provider/self-route.md)
- [Installation](provider/installation.md): what the installer checks, updates, uninstall
Expand Down
6 changes: 3 additions & 3 deletions docs/architecture/tool-integrations.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# OpenCode and Hermes config writers

> Last updated: 2026-11-07
> Last updated: 2026-11-08

How Darkbloom points OpenCode 2 and Hermes Agent at its local API (Only me or Both, me first) by editing their own config files: the
endpoint and key file, the models, the two planners and the safe-edit rules. This explanation is for provider
developers. `darkbloom start --opencode` / `--hermes` call them (`ToolIntegrationStep`,
developers. `darkbloom --opencode` / `--hermes` (`start` with the flag) call them (`ToolIntegrationStep`,
`provider-swift/Sources/darkbloom/ToolIntegration/ToolIntegrationStep.swift`); for users, see
[Use it from OpenCode or Hermes](../provider/local-first.md#use-it-from-opencode-or-hermes).

Expand Down Expand Up @@ -105,7 +105,7 @@ flowchart LR

| Need | Why |
|---|---|
| Hermes v0.20.2 or later (release tag v2026.8.16) | `key_cmd` came in NousResearch/hermes-agent#86891. An older Hermes ignores it and sends its no-key placeholder, so Darkbloom answers every request with 401. `HermesVersion.keyCommandWarning` turns `hermes --version`'s first line into the one warning line `start --hermes` prints for an older Hermes |
| Hermes v0.20.2 or later (release tag v2026.8.16) | `key_cmd` came in NousResearch/hermes-agent#86891. An older Hermes ignores it and sends its no-key placeholder, so Darkbloom answers every request with 401. `HermesVersion.keyCommandWarning` turns `hermes --version`'s first line into the one warning line `darkbloom --hermes` prints for an older Hermes |
| Config v12 (`providers:` as a mapping, with `transport` and `default_model`) | Hermes' current format; `hermes update` migrates an older `custom_providers:` list |
| `max_tokens` after a model switch | Open Hermes bug #124289 (fix #124290 not merged): a named provider's `extra_body` is dropped on `/model <model> --provider <bare name>` and on bare-named fallbacks, so those turns get the engine's 4,096-token default. New chats, and switches that name `custom:<id>`, keep it |
| The profile Hermes reads | After `hermes profile use <name>`, Hermes reads `~/.hermes/profiles/<name>/config.yaml`; the writer edits `$HERMES_HOME/config.yaml`, else `~/.hermes/config.yaml`, and the result names the file it edited |
Expand Down
5 changes: 3 additions & 2 deletions docs/operations/provider-release.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Release A Provider Version

> Last updated: 2026-11-07
> Last updated: 2026-11-08

Build, sign, notarize and publish an explicitly authorized provider artifact.
The pipeline registers its exact official identity through the external platform
Expand Down Expand Up @@ -379,7 +379,8 @@ selects the same names from the version that `/v1/releases/latest` returns
(`scripts/install.sh`, `select_provider_identity`). The installer must work as
`curl | bash`, so it keeps its own copy of the names; the test compares that copy
with the JSON. Every command it prints uses the selected `cliName`, through its
last line, `Next: ~/.<cliName>/bin/<cliName> start --opencode`; the platform
last line, `Next: ~/.<cliName>/bin/<cliName> --opencode`
(`scripts/test-install-identity.py` checks it for both identities); the platform
serves its own snapshot of the script, so a change to these lines reaches
`curl | bash` only once that snapshot is updated.

Expand Down
11 changes: 7 additions & 4 deletions docs/provider/cli-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ upgrade warning. It is independent of `DARKBLOOM_NO_UPDATE_CHECK`.
| Option | Type | Default | Effect | Source |
|---|---|---|---|---|
| `-c`, `--config <path>` | `String?` | `~/.config/darkbloom/provider.toml` | Provider TOML path. Accepted by the commands marked ✓ below | `provider-swift/Sources/darkbloom/Darkbloom.swift` (`ConfigOptions`); `provider-swift/Sources/ProviderCore/Config/ProviderConfig.swift` (`defaultConfigPath`) |
| `--opencode`, `--hermes` | flag | — | With no subcommand, `darkbloom --opencode` is `darkbloom start --opencode` (likewise `--hermes`, or both): every other `start` option goes with it, in any order (`darkbloom --opencode --me-first`), and `start`'s errors and refusals apply. `start --opencode` keeps working; a subcommand keeps its own options (`darkbloom status --opencode` is refused). `darkbloom --help` shows both in one line each ([Set up OpenCode or Hermes](#set-up-opencode-or-hermes)) | `provider-swift/Sources/darkbloom/Darkbloom.swift` (`Darkbloom.expandingToolShortcuts`), applied by `main.swift` before it parses or hosts |
| `--version` | flag | — | Prints `ProviderCore.version` | `Darkbloom.configuration` |
| `-h`, `--help` | flag | — | Help; `darkbloom` with no subcommand prints help | `Darkbloom.run` |

Expand Down Expand Up @@ -298,7 +299,7 @@ LaunchAgent with the arguments `--local-endpoint` has always used
address the tools were given never moves:
1. `--port <n>`: used as given, and saved when it isn't the saved port:
``Local API port: 8007 (saved, instead of 8005: tools set up for 8005 need
`darkbloom start --opencode` or `--hermes` again).``
`darkbloom --opencode` or `--hermes` again).``
2. `[local] port`: used as it is, never probed or moved, even `8000` or a
port another program holds (the local API then says why it isn't up).
3. Otherwise the port this Mac's local API already uses: its running API's
Expand Down Expand Up @@ -365,8 +366,10 @@ LaunchAgent with the arguments `--local-endpoint` has always used

#### Set up OpenCode or Hermes

`--opencode` and `--hermes` point the tools at this Mac's local API with the
config writers ([OpenCode and Hermes config writers](../architecture/tool-integrations.md);
`--opencode` and `--hermes`, usually run as `darkbloom --opencode` /
`darkbloom --hermes` ([global options](#global-options)), point the tools at
this Mac's local API with the config writers
([OpenCode and Hermes config writers](../architecture/tool-integrations.md);
`ToolIntegrationStep`, `provider-swift/Sources/darkbloom/ToolIntegration/ToolIntegrationStep.swift`).
They run once, at `start`:

Expand Down Expand Up @@ -896,7 +899,7 @@ serves that endpoint, two lines follow `pid:`: `serving:` (how it serves, in
the start summary's words) and `requests:` (where your requests go)
(`Local.servingLines`). A server without a key says `requests: this Mac only
(…)` under its API key line instead, and only `serving:` follows `pid:`. A
keyed server adds `tools: darkbloom start --opencode · --hermes`. `--json`
keyed server adds `tools: darkbloom --opencode · --hermes` (`Local.toolsLine`). `--json`
is unchanged.

### `darkbloom route key`
Expand Down
4 changes: 2 additions & 2 deletions docs/provider/direct-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ account key saved, one it can't take can go on to your other Macs, free, and
with `my-macs-first` to the Darkbloom network, billed
([the local router](#when-this-mac-cant-take-a-request-the-local-router)). In a terminal,
`darkbloom start` asks once which you want ([Use your Mac yourself,
first](./local-first.md)); `darkbloom start --opencode` also sets OpenCode up
first](./local-first.md)); `darkbloom --opencode` also sets OpenCode up
([Use it from OpenCode or Hermes](./local-first.md#use-it-from-opencode-or-hermes)).

Chat completions accept `stop` as a string or string array and pass explicit
Expand Down Expand Up @@ -445,7 +445,7 @@ writes too (`StandaloneServer.startLifecycleControl`).
| `401 Unauthorized` | Send `Authorization: Bearer $(cat ~/.darkbloom/local_token)`; the token in `local.json` is authoritative |
| `413` on a chat request with images | Body above `localInferenceMaxUploadBytes`; downscale or send fewer images |
| `darkbloom local` says no server is running but a process is listening | The listener is not a Darkbloom server (foreign process on the port) or a stale `local.json` was cleaned; restart with a free port |
| ``the local API isn't up: port 8001 is in use (`darkbloom start --port 8002`)`` (`status`, `local`) | Another program listens on this Mac's local API port. Free it and run `darkbloom restart`, or run the command it names: the new port is saved, and tools set up for the old one need `darkbloom start --opencode` or `--hermes` again |
| ``the local API isn't up: port 8001 is in use (`darkbloom start --port 8002`)`` (`status`, `local`) | Another program listens on this Mac's local API port. Free it and run `darkbloom restart`, or run the command it names: the new port is saved, and tools set up for the old one need `darkbloom --opencode` or `--hermes` again |
| Model not in `/v1/models` | Only models with an engine-v2 adapter are advertised; `darkbloom models list` |
| Endpoint unreachable from another machine | Default bind is loopback; `--bind 0.0.0.0` and open the port, then set a reverse proxy with TLS |
| A DevNet build (`darkbloom-dev`) fails a request for a model it hasn't loaded with ``The production Darkbloom on this Mac holds this Mac's GPU: … no model of this build loads here until production stops serving`` | The production app serves on this Mac, and two models don't fit one Mac's memory: a DevNet build refuses each cold load at its start, before any eviction, weight hash or reservation (`StandaloneServer.ensureModelLoaded`, `ClusterGPUHold.productionServesHere`). A model it loaded before production started keeps serving. Retry once production stops serving here; production's own build never refuses this way |
Expand Down
Loading
Loading