What you need, how to run it, and where things are. The working contract for changes — footguns, verification, taste — is AGENTS.md; read that first. Why the tree is shaped this way is docs/design.md. The wire, the log and the session, as the code implements them, are wire.md, log.md and sessions.md.
- Rust stable. The workspace edition is 2024.
- The Tauri CLI as a cargo subcommand:
cargo install tauri-cli --version ^2. - Python 3, for release manifest validation in
make check. - cargo-machete 0.9.2 and cargo-deny 0.20.2, for the dependency gates in
make check:cargo install --locked cargo-machete@0.9.2 cargo-deny@0.20.2. Another version stopsmake checkwith that line; the Makefile says why. - cargo-nextest 0.9.152, which runs the Rust tests in
make checkand CI (The Rust tests):cargo install --locked cargo-nextest@0.9.152. It is pinned the same way. - Bun, for the window's install, typecheck, Vite, and production build.
- On macOS, Xcode or its Command Line Tools:
build.rscompiles the shell's on-device speech (crates/hotline-app/macos/speech/) withxcrun swiftc. ItsSpeechAnalyzerpath needs Swift 6.2 or newer (Xcode 26); an older compiler builds only theSFSpeechRecognizerpath (voice.md). - CMake: the
opuscrate builds libopus from source for GPT-Live calls (brew install cmakeon macOS; GitHub's runners have it). - Python 3 and network access once per target, for the speech engine:
hotline-corelinks sherpa-onnx's prebuilt static library, which the build takes only from.speech-engine(SHERPA_ONNX_ARCHIVE_DIRin.cargo/config.toml).scripts/fetch-speech-engineputs it there after checking its SHA-256 againstscripts/speech-engine.sha256;make dev,check,buildandverifyrun it first, and so does every CI job that compiles Rust. A plaincargo buildon a fresh checkout needs it run once by hand (--targetfor a cross build). - On Linux,
libayatana-appindicator3at runtime, for the tray, and its dev package (libayatana-appindicator3-dev) to bundle: the Tauri CLI finds the library through pkg-config before it writes the deb. A Homebrewpkg-configearlier on PATH searches only Homebrew's directories; pointPKG_CONFIG_PATHat the system one (/usr/lib/x86_64-linux-gnu/pkgconfig) formake build.
hotline-core has no Tauri dependency. The shell crate is the only place
Rust that needs Tauri lives.
crates/hotline-contract/src/ the wire's types (serde + ts-rs), a file per concern; a leaf crate
crates/hotline-support/src/ the utilities that hold no Hotline state; a leaf crate
paths.rs the data directory's layout, and a linked teammate's id
room_lock.rs one writer per room
credentials/ the OS credential store that holds the secret values
images.rs what an attached or generated image is made into before anyone sees it
thumbs.rs smaller copies of pictures for a phone
fence.rs the one fence around anything quoted out of a conversation
log_file.rs where the app's own lines go when nobody reads its output
process.rs where every child process is made, so none opens a console window on Windows
process_windows.rs a Windows child's kill-on-close job
crates/hotline-store/src/ what is kept on disk and rebuilt from it; on the two leaves and nothing else
log/ streams: append, fold, segments, subscribe; tapes and threads
search.rs beside the tape: FTS5 search over every tape
chapters.rs a tape's chapter list
previews.rs a tape's last line, for the roster
link.rs the line a thread leaves on its parent, and where a thread stands
sent/ files teammates send the person, and their readback
crates/hotline-tools/src/ a teammate's workspace and shell tools; on the two leaves and nothing else
capability.rs the session's lease every tool checks, and the epoch that revokes it
workspace.rs workspace tools on cap-std: the wall, granted folders, read, grep, edit
shell.rs the shell command, confined: Seatbelt on macOS, bubblewrap on Linux
crates/hotline-websearch/src/ web search for every teammate, keyless by default, ranked and cleaned; on the contract alone
exa.rs, parallel.rs, ... the four hosted providers and SearXNG, one file each
clean.rs, rank.rs error pages and chrome out, duplicates and mirrors merged
query.rs, when.rs what the query asked for: its language, its dates
mock.rs a provider on localhost, for tests (the `test-support` feature)
crates/hotline-room/src/ the room as the code above the core sees it; on the leaves, the store and web search
room.rs the roster fold, settings, and schedules
mcp_servers.rs the `mcpServers` setting, read the way the fold reads it
linked.rs linked desks: their records, qualified ids, the roster that crosses
room_handle.rs RoomHandle, the seam the wire calls the live room through
tool_ledger.rs what tools a teammate got, from where, and why one is absent
voice/ voice's settings, its spend and the budget that gates it, spoken replies
provider_auth.rs, ... ProviderAuth, the secret and text helpers, the TLS default, the computer's home
crates/hotline-mcp/src/ Hotline as an MCP client; on the contract, the support, the tools and the room
lib.rs the servers settings name, a teammate's grant, the live connections
tool.rs one granted tool as Hotline Agent calls it, and its ledger row
oauth.rs OAuth sign-in to an HTTP server, with what the vault keeps handed in
oauth/reach.rs which addresses a server's sign-in may connect to, and the client that holds it to them
crates/hotline-browser-core/src/ the desk browser as the desk and its browsers share it; on the leaves and the store
lib.rs DeskBrowser and its types, the Gate a page's loads are asked of, a teammate's web data
pipe.rs the JSON lines between `hotline serve` and its browser helper, and the helper's end
crates/hotline-voice/src/ calls and voice engines; the room is reached through CallRoom
call_room.rs the core's callbacks, with temporary operations labelled by removal slice
lib.rs, call.rs, input.rs call ownership, lifecycle and bounded input
duplex.rs, front*.rs live sound, the front's conversation and its leased tools
dispatcher.rs the desk's call assistant and its metering
turn.rs, synthesis.rs turns, streamed replies and spoken clips
record.rs, replies.rs the call's record and spoken-reply counts
speech.rs the Speech seam: a clip heard, a reply spoken, and the errors either gives
speech/ the providers' adapters, which one a call uses, the desk's own models
realtime.rs the Realtime seam: one live spoken conversation that renews itself
realtime/ Grok Voice and GPT Realtime over a socket, GPT-Live over WebRTC
crates/hotline-core/src/
thread/ the one name for a conversation, its store and its policy
vault/ credential metadata beside the room stream
session/ Session, the funnel, quiet, chapters, the scheduler, peer threads
driver/ Hotline Agent on Rig, and the ACP child with its registry and OAuth proxy
models.rs the providers Hotline Agent reaches, and the model catalogue they serve
providers/ connection work Rig does not own; requests stay on Rig's clients
capabilities.rs which connected provider the owner can pick for each job
pricing.rs what a model costs per token
spending.rs the spending ledger and the budget it enforces
mcp/ Hotline's own teammate tools, and the vault's side of the client
skills.rs the catalog: built-in, gateway and workspace skills, copied into a workspace
computer/ runtime detection and one container per teammate
voice/ the room's CallRoom implementation and the vault's engine glue
imagegen/ making images over whichever connected provider the owner has
link_preview.rs a link's card, picture and site icon, each fetched once and kept
desk.rs the room, vault and log behind the wire
boot.rs one boot, the app's and `hotline serve`'s, that returns its errors
wire/ the door: seats, commands, subscriptions, the phone and relay doors
remote/ Remote: the sealed listener, pairing, the relay, a linked desk's channel
push.rs notifications to paired phones
import.rs copies an existing Hotline data directory
import/ the previous edition's roster and records, read-only
test_support.rs what the unit tests of more than one module share
bin/hotline-import.rs the importer as a binary
bin/hotline-mcp-echo.rs a one-tool stdio server the MCP harnesses spawn
bin/hotline-models-sync.rs rewrites models.json from models.dev
crates/hotline-core/models.json the model catalogue: a filtered snapshot of models.dev
crates/hotline-core/tests/ headless proofs driving the real core over the wire
crates/hotline-app/ the Tauri 2 shell: plugins, the menu, the door
crates/hotline-cli/ `hotline`: the desk with no window (`hotline serve`), and its operator commands
crates/hotline-browser/ `hotline-browser`: the server's desk browser, Linux only, a helper `hotline serve` starts; it compiles the app's Linux browser files from crates/hotline-app, and stands on hotline-browser-core, not the core
ui/ the React window, built against the generated contract; ui/src/ui is the design system
assets/ the mark and the app tile it sits on; `make icons` renders the icon set from them
docs/ what is
The core is a library. The shell binds its door on a loopback port, injects
the port and a token into the page, and opens a window on it. There is no
child process for the room. Opening a Desk opens the room, which settles
every tape and every thread (expired permission cards, a compact, the
search index) and starts the idle chapter sweep and the scheduler's clock
before anything is served.
make dev # the Tauri shell, Vite with hot reload, on .hotline-dev
make check # the window's typecheck, lint and tests, the dependency gates, the Python tests, cargo fmt, clippy -D warnings, the Rust tests under nextest
make verify # the headless harnesses, driving the real core over the wire
make precheck # what CI's runners would fail, caught here; see Before pushing
make build # a release bundle under target/release/bundle (unsigned)
make icons # every platform's app icon, and the tray marks, from assets/A release is a tag desktop-vX.Y.Z whose version matches Cargo.toml and
tauri.conf.json; .github/workflows/desktop-release.yml builds each
target on its own runner, signs and notarizes the Mac bundles from the
repository secrets, and publishes one GitHub Release marked latest. A beta
of it is a tag desktop-vX.Y.Z-beta.N, built and signed the same way and
published as a pre-release (Update tracks). A hand
run of the workflow builds and keeps artifacts only. CHANGELOG.md takes
an entry per version, and docs/releases/<version>.md its release notes.
make dev exports HOTLINE_DATA_DIR to .hotline-dev in the checkout, then
runs cargo tauri dev from crates/hotline-app, where tauri.conf.json
is. That starts Vite for the window on port 5174 and refuses any other
port, so a port already in use is a mistake rather than a second
instance. The shell generates a one-launch token, binds the door on
127.0.0.1 with an ephemeral port, and sets window.__hotlineDesk to
{platform, origin, token, version, dataDir} before the page loads.
make check is, in order: bun install --frozen-lockfile; a contract
preflight that stops in one line when ui/src/generated/contract.ts is
partial (a filtered cargo test wrote it); bun run typecheck, bun run lint (Biome, lint only), bun run knip (no unused export, file or
dependency; ui/knip.json and the Makefile say what is exempt and why) and
bun run test in ui/; the dependency gates, make deps: cargo machete --with-metadata (no unused Cargo dependency), cargo deny --locked check advisories licenses (no advisory against Cargo.lock that deny.toml
does not list with its review condition, and no crate under a license
nobody reviewed), scripts/window_licenses.py (the same for the window's
packages; THIRD-PARTY-NOTICES.md says what was
reviewed) and bun audit in ui/ (no advisory at all, but the ones the Makefile's BUN_AUDIT_IGNORE names with their reasons); the speech engine fetched and checked against its pinned hash;
scripts/security-citations (every test docs/security.md or
docs/contract/phone.md cites is a fn in
the file its row names); the Python tests under scripts/ and
site/tests/; cargo fmt --all --check; cargo clippy --workspace --all-targets -- -D warnings; cargo nextest run --workspace, then
cargo test -p hotline-contract (The Rust tests). A
window that does not compile is a broken build however green the Rust is.
make verify is cargo test --workspace --test '*': the integration
tests under crates/hotline-core/tests/, not the unit tests that live beside
the code. make check already runs those, and the unit tests, under
nextest. The tests that talk to a real agent are skipped unless you set the
env they name — see The harness.
HOTLINE_TRACE_SENDS=1 on a desk run from a terminal writes one stderr line
per person's line said to a teammate, with millisecond stamps from its arrival
for the start gate (and who held it), a chapter's close and stop, the fresh
start's parts, the marker and the line itself, and one line for each start no
message is waiting in. crates/hotline-core/src/session/send_trace.rs says
what each step is. Off, it costs nothing but a flag read.
Two more variables are for development only. HOTLINE_EXTRA_DESKS adds
desks to the window's list by endpoint: a JSON list of { "id", "name", "origin", "token" }, for example a second hotline serve on this machine.
A malformed entry is skipped and said. HOTLINE_DEV_SIGN_IDENTITY picks
the certificate make dev signs the debug binary with on macOS
(scripts/cargo-dev-sign); without it the first "Apple Development"
identity in the keychain is used, and with none the binary stays unsigned.
make check and CI run the Rust tests with
cargo-nextest, configured in .config/nextest.toml.
It runs each test in a process of its own, so a test that passes only
beside another (a global, a shared temp path) fails here. A test running
for 60 seconds is reported SLOW, and at 180 it is ended and fails as
TIMEOUT with its name, where a hang used to show only as the CI job's
time limit. On this Mac, four at a time, the slowest test takes 24
seconds (session::avatar::face's seeded face, measured 2026-12-01), and
the whole suite three minutes either way.
Two things stay on cargo test. The contract crate's export tests write
ui/src/generated/contract.ts, and ts-rs starts that file afresh in each
process that writes it: under nextest every export test would leave the
file holding its own type alone (The generated
contract). So the config's default-filter leaves
hotline-contract out, and cargo test -p hotline-contract runs it, last
in make check. And nextest does not run doc tests; the workspace has none.
Runs filtered by name, -- --ignored runs and the shuffle leg are plain
cargo test as before.
cargo nextest run --workspace # what make check runs
cargo nextest run -p hotline-voice acknowledge # a filter, as with cargo test
cargo nextest run -E 'test(=voice::acknowledge::a_teammate_working_in_silence_is_heard_saying_what_it_is_doing)'Locally a test runs once: no retries, because a flaky test is fixed at its
cause. CI runs the ci profile, which retries a failed test once, only so
that nextest can tell a flaky test from a broken one. A test that fails
twice fails the job. A test that fails and then passes leaves the job
green and is named as flaky three ways. The test step's log has
TRY 1 FAIL on its line, with that attempt's output, then TRY 2 PASS;
the summary at its end lists it as FLAKY 2/2. The run has a warning
annotation, Flaky test. And the job's summary has a table, written by
scripts/flaky_tests.py from target/nextest/ci/junit.xml, of the test
binary, the test and how many attempts failed. A flaky test in that table
is a task, not a pass: run it alone and under load until it fails, and
fix the cause.
make precheck # before any pull request or release branch is pushed
make precheck-full # before a release pull request
scripts/precheck windows ui # only the legs namedmake check is green on this Mac and says nothing about what only breaks
on a runner, which was every CI failure in 0.39.0: test helpers only
Unix uses, dead code on Windows; a window test that leaned on a window
another file left defined; a tool the runner's PATH found differently.
scripts/precheck runs one leg for each, prints a line per leg with
its time, and for a failure the tail of target/precheck/<leg>.log and
the command that reruns it. Every leg runs even after one fails. A tool a
leg needs and this Mac lacks is installed with brew, cargo install or
rustup, and announced first.
| Leg | What it runs | What it catches |
|---|---|---|
fmt |
cargo fmt --all --check |
unformatted Rust |
lockfile |
cargo metadata --locked, bun install --frozen-lockfile |
a Cargo.lock or bun.lock that CI's --locked refuses |
deps |
make deps: cargo machete, cargo deny check advisories licenses, bun audit |
an advisory published since the lockfile last changed, an unused dependency, an unreviewed licence |
actionlint |
actionlint (with shellcheck) |
a workflow that reads what is not there, a run: script shellcheck faults |
citations |
scripts/security-citations |
a test docs/security.md or docs/contract/phone.md cites that is renamed or moved without its row |
contract |
every ts-rs export test, writing contract.ts from nothing |
a committed contract that is stale, or that a filtered run truncated; the file you have is put back |
clippy |
cargo clippy --workspace --all-targets --locked -- -D warnings |
the host's lints |
windows |
the same clippy for x86_64-pc-windows-msvc, through cargo xwin |
Windows-only code, and code only Unix uses that is dead on Windows |
ui |
bun run typecheck, bun run lint and bun run knip, then bun test ./<file> for each file alone, then bun run test |
a test file that passes only after another has set up a global for it |
linux (full) |
clippy and cargo test --workspace --locked in Ubuntu 24.04 |
Linux-only code and its tests |
bare-path (full) |
the integration tests with PATH /usr/bin:/bin:/usr/sbin:/sbin and the toolchain |
a test that needs a tool this shell put first (mise, uv, Homebrew's python) |
shuffle (full) |
every test in a random order, --shuffle |
a test that passes only after another: a shared temp path, a global |
How the less obvious legs work:
windowscross-compiles withclang-clandlld-link(Homebrew'sllvmandlld, which are keg-only, so the script puts them on PATH for that leg) and the MSVC CRT and SDK headerscargo-xwindownloads once into~/Library/Caches/cargo-xwin, accepting Microsoft's licence for them.ninjabuilds libopus. The C in ring, aws-lc-sys and libopus compiles, so the whole workspace checks and nothing is skipped. It links nothing: tests are compiled, not run.ui: bun runs every file in one process, in the order this machine lists them, so a global one file leaves behind is there for the files after it. A file that fails alone is named with its command.linuxruns under Apple'scontainerCLI. The image,scripts/precheck-linux.Containerfile, is the check job's packages on ubuntu-24.04 and this Mac's stable Rust, tagged by both, so changing either builds a new one. The checkout is mounted read-only; the build writes only to volumes (hotline-precheck-*): the target directory, cargo's registry, and the three gitignored folders tauri-build writes into the app crate. The tests run as an unprivileged user, as on the runner, under an init that reaps what they kill (a zombie looks alive to the tests that check a process group died), with every test binary run even after one fails. The container's masked/procpaths are cleared so bubblewrap can mount its own: the workspace shell's sandbox tests, ignored on Linux unless asked for, run here with--ignored, as in workspace-isolation.yml; ci.yml's Linux job, without the AppArmor grant, reports them ignored. The tests run undercargo test, not nextest as in CI: the image has no nextest, and one process per binary also catches the test that passes alone and fails beside another, which nextest's process per test hides. The container is arm64, this Mac's own architecture, where the runner is x86_64: code that differs by architecture rather than by operating system is the one thing this leg does not see.container volume rmof the five volumes starts it cold.bare-pathcompiles with the normal PATH, then cargo runs each test binary throughscripts/precheck-runner-env, which keeps cargo's variables,HOME,USER,TMPDIRandLANGand nothing else. This Mac has the Command Line Tools, so/usr/bin/python3works here; a runner with only Xcode, task-89's case, is not reproduced.shufflesetsRUSTC_BOOTSTRAP=1in the test runner, so stable's libtest takes-Z unstable-options --shufflewithout the variable reaching cargo, which would rebuild every crate. Each binary prints its seed intarget/precheck/shuffle.log;-- -Z unstable-options --shuffle-seed <seed>replays it. Doc tests are not shuffled.
Times on a Mac Studio with 18 cores, measured 2026-10-17. Warm means a
build of the same tree has run before; cold, an empty target directory
(and for linux, a new image), with crates already
downloaded and cargo-xwin's MSVC files already cached:
| warm | cold | |
|---|---|---|
make precheck |
15 s | 4 min |
linux |
70 s | 5 min, the image included |
bare-path |
35–45 s | a cargo test build first |
shuffle |
75 s | a cargo test build first |
make precheck-full |
3.5 min | about 12 min |
make hooks # git config core.hooksPath .githooks, once per cloneThe hooks are plain sh in .githooks/, versioned with the code they
check; there is no hook manager. make dev and make check print a line
while they are off and never turn them on themselves. The setting lives in
the repository's shared config, so every worktree, a dispatched agent's
included, runs the hooks its own branch carries; a branch cut before
.githooks/ existed runs none.
| Hook | What it runs | How long |
|---|---|---|
pre-commit |
refuses a staged *.p8, *.pem or auth.json; cargo fmt --all -- --check when a .rs file is staged; when contract.ts is staged, refuses it if it lost more than a quarter of HEAD's lines or does not compile alone; bun run typecheck when anything under ui/ is staged |
1–2 s |
pre-push |
make precheck (Before pushing) |
15 s warm, 4 min cold |
The contract.ts check is for the filtered run's truncation
(The generated contract): a file missing types
either shrinks or names a type it no longer defines. The typecheck and
cargo fmt read the working tree, not the index, so a partly staged file
is checked as it stands on disk.
git push --no-verify skips pre-push, and the hook says so when it
fails; it is for an emergency, and the push then has only CI behind it.
There is no pre-merge-commit: a clean merge (brainfile land's) joins
commits that each passed pre-commit, and a merge that stopped on a
conflict is finished with git commit, which runs pre-commit on
everything the merge brought in. scripts/test_githooks.py, in make check, stages a clean change, unformatted Rust, a truncated contract, a
contract that does not compile and a key file in a clone, and runs
pre-commit on each.
Settings → Updates checks GitHub every six hours while a packaged Hotline is
running, with a first check after 20 seconds when due. Check now bypasses
that interval. The last attempt and available version are stored in
<data dir>/updater.json; restarting Hotline preserves the interval. A new
installed version starts a fresh check. Failures keep the previous offer.
Release notes are written for each version in docs/releases/<version>.md:
a headline and a few plain highlights for the person using Hotline. They are
what Settings → Updates and the update card offer, through the
conversation's markdown renderer, which never interprets HTML. The GitHub
Release shows them over the version's CHANGELOG.md section, the full
record, and a comparison with the previous tag (scripts/release_notes.py).
A tag missing either fails before anything is published. Cached offers never authorize installation:
Hotline rechecks the trusted endpoint and requires the version the user reviewed.
A version found while the window is open also shows once as a card in the
window's bottom-right corner (ui/src/components/UpdateFloat.tsx), whose
Update… opens Settings → Updates. Closing it puts that version away
(hotline.updateDismissed in the window's local storage) until a newer one
is found. A dev build never checks, so VITE_PREVIEW_UPDATE=0.35.1 make dev
pretends that version is out, for the card and Settings → Updates alike.
Update and restart uses tauri-plugin-updater 2.11.0, following
Prism's desktop updater. The plugin verifies the downloaded signature before
installation. A download can be cancelled; installation cannot be cancelled
from Hotline after the native installer starts. A Linux deb or rpm does not
go through the plugin's installer, which runs pkexec from PATH and then
falls back to sudo. Hotline's PATH is the login shell's, so a Homebrew
polkit's pkexec, which is not setuid, can shadow the system one. The last
sudo fallback then asks for a password on the desktop session's own
terminal, where nobody can answer, and every later sudo queues behind it.
crates/hotline-app/src/linux_package.rs instead runs /usr/bin/pkexec
with /usr/bin/dpkg -i or /usr/bin/rpm -U, all by absolute path. It has
no sudo fallback and gives up after ten minutes. A dismissed password prompt
reads as cancelled. Any other failure carries the installer's last line.
Failed download, verification or installation leaves
Hotline running and releases the room so work can continue. Successful installation
hands restart to Tauri. If the OS cannot relaunch it, reopen Hotline normally.
The room refuses installation while a turn, queued message, peer request, session start or chapter handoff is running. Once idle, it holds a restart lease through download and installation, blocking new work and syncing the room, tape and thread files. Due schedules stay on disk for the next launch, or resume after cancellation/failure. Installation replaces application files; it does not migrate, reset or overwrite the data directory, vault, discovered models, manual model entries or conversations.
Settings → Updates also lists the agent harnesses the desk runs, one row
each (driver/acp/updates.rs, harness.updates, harness.updates.check,
harness.update). A harness can be up to three parts: its CLI, the npm
adapter that speaks ACP for it, and a release fetched from the ACP registry.
The parts fold into one state, so the row says whether the harness is
behind, not which part is. Each CLI is checked and updated the way it was
installed, read off where its command really lives: the npm of its npm
prefix, the brew of its Homebrew prefix, or its own updater (claude update, cursor-agent update, opencode upgrade). A mise shim is followed
to the real command first. An adapter is behind when today's catalogue pins
a newer version than the last start ran; Update puts it in npm's cache so
the next start does not wait. A check runs when the screen opens and the last
is six hours old, or on Check now; never from a teammate. A session keeps the version it started
with, so a teammate gets an update at its next start.
The configured targets are macOS aarch64/x86_64 app bundles, Linux x86_64
and aarch64 AppImage/deb/rpm, and a Windows x86_64 per-user NSIS installer. Explicit manifest keys include the installer suffix, so a
missing deb is an error, never an AppImage fallback. Other packages and
architectures open the release page instead. Development builds, including
make dev, neither check nor install. Headless tests use Tauri's mock runtime,
a separate test signing key, and loopback HTTP fixtures; they never install.
The first release containing this updater must itself be installed manually
on copies that predate it.
The public signing key and the Stable track's HTTPS endpoint live in
crates/hotline-app/tauri.conf.json. The endpoint currently points directly
to GitHub's releases/latest/download/latest.json; a future hosting change can
serve the same contract from another configured HTTPS endpoint. The Beta
track's endpoint is a constant in crates/hotline-app/src/updater.rs. There
is no runtime URL or signing-key control in the window: the Track row
chooses between those two addresses and stores only which.
CI requires TAURI_SIGNING_PRIVATE_KEY and optionally
TAURI_SIGNING_PRIVATE_KEY_PASSWORD in repository secrets. This key is separate
from Apple signing credentials. Keep an independent private backup: replacing
the public key in a future build does not teach already installed copies to
trust the replacement. Never commit the private key or include it in artifacts.
make build keeps ordinary local bundling available without a signing key;
release CI explicitly enables createUpdaterArtifacts and requires signatures.
Each workflow build collects packages and signatures under predictable names.
After every build target passes its checks, scripts/updater_manifest.py verifies that
every expected package/signature exists and writes updater-X.Y.Z.json and,
for a final release, latest.json. Notes come from docs/releases/. The release becomes
latest only after all assets are uploaded. Manual workflow runs produce signed
workflow artifacts without publishing. Published versions cannot be rebuilt;
ship a new desktop-vX.Y.Z tag, or the next beta. Windows updater signatures use the
same required updater key. Authenticode publisher signing is deferred; an
unsigned installer can still trigger Windows reputation warnings.
Settings → Updates has a Track row. Stable, the default, is offered
final releases. Beta is also offered the betas cut from a release branch
before a final, X.Y.Z-beta.N. There is no nightly track.
The choice is the desk's: <data dir>/update-track.json, beside
updater.json and the shell's other files, holding {"track":"beta"} and
nothing else. A file that is missing, unreadable or names anything else is
Stable. Changing the track forgets the offer and the check made on the other
one and checks the new one at once.
| Track | Manifest it reads | What it is offered |
|---|---|---|
| Stable | https://github.com/1Broseidon/hotline/releases/latest/download/latest.json |
a final release newer than the running version |
| Beta | https://raw.githubusercontent.com/1Broseidon/hotline/update-tracks/beta.json |
a final release or a beta.N newer than the running version |
Newer means newer by semver, on both tracks, and that one rule gives every
case. 0.49.0-beta.1 is older than 0.49.0, so a desk on a beta is offered
its final, from either track. A desk on Beta is offered each later beta and
each final, whichever is newest. A desk that goes back to Stable is never
moved to an older version: on 0.49.0-beta.2 it is offered nothing while
Stable's newest is 0.48.x, keeps running the beta, and is offered 0.49.0
when that is released. The Track row says so: Keeps 0.49.0-beta.2 until a
newer final release. A desk on Stable is never offered a pre-release even
if one were served at Stable's address, and Beta takes beta.N and no other
pre-release (updater::newer).
Because a desk can open a newer build's data with an older build, a build leaves alone what a newer build wrote: records it rewrites keep the fields it does not know, and the files it sweeps at start are only its own (log.md).
The first beta of all has to be installed by hand, from its release page: a build from before tracks has no Track row and reads only Stable's address. From that build on, betas arrive in the app.
Where the two manifests live, and why. Stable's is the latest.json
attached to whichever release GitHub serves as latest. GitHub's latest
release is "the most recent non-prerelease, non-draft release", and "drafts
and prereleases cannot be set as latest" (GitHub's REST reference for
releases), so a beta published as a pre-release never answers at that
address. Two more things hold even if that did not: a beta is uploaded
without any latest.json, and the workflow publishes it with
--latest=false.
Beta's is one file, beta.json, on the branch update-tracks, which holds
that file and nothing else. scripts/beta_pointer.py replaces it after each
release, beta or final, with a copy of that release's own
updater-<version>.json. A branch was chosen over a rolling release that
holds only the manifest, for three reasons. Replacing a release's file is a
delete and then an upload, so a desk that checks in between is told the
manifest is missing, and a run that fails in between leaves it missing;
moving a branch is one step, and a reader sees the old file or the new one.
The branch moves only as a fast-forward from the head that was read, so two
releases finishing together cannot lose one's update. And a release whose
files change is exactly what "published versions are immutable" says does
not happen: turning on GitHub's immutable releases for the repository would
break a rolling release and leaves the branch alone. The cost is a second
host, raw.githubusercontent.com, which caches a file for five minutes, and
a branch that must not be deleted or protected against the workflow's
token. If it is deleted, a desk on Beta says the update check failed and
keeps what it has; the next release makes the branch again.
What happens in what order, and what a failure leaves.
| Step | A failure here leaves |
|---|---|
The tag is checked: it matches Cargo.toml and tauri.conf.json, is X.Y.Z or X.Y.Z-beta.N, and is not already published |
nothing built |
| Each target builds and signs its packages; the server archives build | no release; both manifests as they were |
The manifest is generated, which refuses a missing package or signature; a beta is checked to have no latest.json |
no release; both manifests as they were |
| A draft release is made and every file uploaded to it | a draft nobody is served; a second run of the workflow finishes it |
| The draft is published in one call: a final as latest, a beta as a pre-release | before the call, a draft; after it, the whole release. Stable's manifest changes here for a final and not at all for a beta |
beta-track: the published release's own manifest is fetched back, every package it names is asked for, and the branch is moved forward to it |
the release stays published and Beta's manifest stays on the previous release, whole. Run the failed job again (Re-run failed jobs); the build is not repeated |
The Beta manifest only ever moves forward by semver. A patch to an older
line (0.48.4 while Beta is on 0.49.0-beta.2) leaves it where it is.
What each package format does with a beta's version. The version the
app reports and the updater compares is always the semver, 0.49.0-beta.1.
Two formats sort versions by their own rules and are given the beta their
way (scripts/release_version.py); a final release is written as it is
everywhere.
| Package | Version it carries for 0.49.0-beta.1 |
Why |
|---|---|---|
macOS .app, .dmg |
0.49.0-beta.1 in CFBundleShortVersionString and CFBundleVersion |
the bundler writes it as it is; nothing on a Mac orders installs by it, and the updater replaces the bundle |
| Windows NSIS | 0.49.0-beta.1 as the installed version, 0.49.0.0 in the file's numeric version field |
the installer compares installed versions by semver, so the final is an upgrade |
| AppImage | 0.49.0-beta.1, in its file name |
the format has no version order; the updater replaces the file |
| deb | 0.49.0~beta.1 |
dpkg reads 0.49.0-beta.1 as version 0.49.0 at revision beta.1, which is newer than 0.49.0. The workflow rewrites the one Version: line (scripts/deb_version.py) and signs the package again |
| rpm | version 0.49.0, release 0.beta.1 |
- cannot be in an rpm version, and the bundler refuses one. Release 0.beta.1 sorts before the final's release 1, so rpm -U takes the final as an upgrade. The workflow packs the rpm in a step of its own with that label and signs it again under the semver |
| Server archive | 0.49.0-beta.1, in its file name |
hotline update reads only Stable's manifest and refuses a pre-release for --version, so a server gets a beta only when someone unpacks one by hand; it then moves to the final by hotline update, which compares by semver |
The rpm mapping must not change in the middle of a release's betas: rpm
sorts 0.49.0~beta.2 (the form a later bundler writes by itself) before
0.49.0-0.beta.1.
Release notes for a beta (scripts/release_notes.py). A beta has none
of its own. 0.49.0-beta.1 shows docs/releases/0.49.0.md as it stands at
the tag, so the notes for the final are started before its first beta and
each beta shows them as they have grown. Its GitHub Release puts one line
above them saying it is a beta and how a desk gets one, then the changelog's
[0.49.0] section, or [Unreleased] while the branch still files changes
there, and a comparison with the last final release.
From the release branch, with make precheck passing:
- Start
docs/releases/X.Y.Z.mdif it is not there. The tag is refused without it. - Set the version and bring the lock file along:
python3 scripts/release_version.py X.Y.Z-beta.N --set && cargo update --workspace. That changesCargo.toml,crates/hotline-app/tauri.conf.jsonand the workspace's own entries inCargo.lock. A final also changes the versionsite/public/index.htmlshows. - Commit it as
Release X.Y.Z-beta.N, push the branch, and wait for CI on that commit. - Tag that commit
desktop-vX.Y.Z-beta.Nand push the tag. Betas count up from 1 and are never reused: a published version is immutable. - When the workflow finishes, the release page shows a pre-release, the
repository's latest release is still the last final one, and
beta.jsononupdate-tracksnames the beta. A desk on Beta is offered it at its next check.
The final is the same with X.Y.Z: after it, both tracks offer it, and a
desk still on a beta is moved to it from either track.
Nothing above has run on GitHub's runners. Before the first beta is tagged,
run the workflow by hand on the pushed branch (Actions → desktop-release →
Run workflow), twice: once with version 0.49.0-beta.1, and once with
it empty. A hand run publishes nothing and moves neither manifest. The
first run must show:
- Every
buildjob is green, with these steps green in it: The version, and how each package format writes it; on Linux, Package a beta's rpm, Write a beta's deb for dpkg and sign its Linux packages again and The Linux packages say the version their package managers sort; on macOS, The Mac bundle says the whole version. - The Linux step's log shows
Version: 0.49.0~beta.1fromdpkg-deb --info, and no error from the rpm line: the rpm says0.49.0-0.beta.1. - Mac signing and notarization pass with the version
0.49.0-beta.1. - Each
desktop-*artifact holds its packages namedhotline_0.49.0-beta.1_<platform>…, each updater package with a.sigbeside it: eight packages and eight signatures in all, and one.dmg. - Both
server-*artifacts holdhotline-server_0.49.0-beta.1_….tar.gz. - The
manifestjob is green. Itsrelease-manifestartifact holdsupdater-0.49.0-beta.1.json, with"version": "0.49.0-beta.1"and eight platforms whose URLs are underreleases/download/desktop-v0.49.0-beta.1/, and it holds nolatest.json. -
publishandbeta-trackare skipped. No release, draft or tag was made, andreleases/latestis unchanged. - On a Mac, the
.dmgfrom the artifact installs, opens without a Gatekeeper refusal, and shows0.49.0-beta.1in Settings → Updates and in About; the Track row is there and set to Stable. - On Linux, if a machine is to hand:
sudo dpkg -iof the deb over an installed0.48.3upgrades it, anddpkg -l hotlineshows0.49.0~beta.1.
The second run, with no version, builds the checkout's own and must be
green in every job, with latest.json in release-manifest identical to
updater-<version>.json: a final release still builds as it did.
What a hand run cannot show, and the first real beta does: that the
pre-release is published and is not the latest release, that the address
Stable reads still answers with the last final, and that beta-track
creates update-tracks and writes beta.json. Check those three by hand
after the first beta's workflow finishes. If beta-track fails, nothing is
harmed: the beta is published, Stable is untouched, and no desk is on Beta
yet.
Each build runs formatting, Clippy, the workspace tests, UI type checking and
manifest tests. Windows and macOS also test a disposable native credential entry.
Local core harnesses inject in-memory stores; they never use the operator's
keychain. Run cargo test -p hotline-support native_store_roundtrip -- --ignored
to explicitly test the native store with a disposable entry. Linux build hosts
need libdbus-1-dev, and desktop credential use needs an unlocked Secret
Service session. The credential format and Rig OAuth exception are described
in the vault.
The shell is crates/hotline-app. Plugins remember the window's place,
post toasts, pick folders, open links, and write the clipboard; the
judgement for those lives in the page (ui/src/native.ts, ui/src/notify.ts),
not in the shell. The window has no system frame on Linux and Windows:
the page draws its own top strip (ui/src/ui/Titlebar.tsx) with the
window's title, the mark, and its minimize, maximize and close, and every
band drags. On Linux the window is transparent and the page rounds its own
corners to the pane radius, squared off while maximised; Windows rounds a
top-level window itself. On macOS the frame stays, with the title bar overlay so the rail header
can sit on the traffic-light centre line, and the menu bar is this
process's: its items emit hotline://menu and the window handles them.
Capabilities for the main window are
crates/hotline-app/capabilities/default.json.
| plugin | what the page uses it for |
|---|---|
window-state |
size, place, maximised, restored on launch |
notification |
a toast when a teammate finishes or blocks while the window is not focused |
dialog |
the folder picker, and "Remove …? Their conversation goes too." |
opener |
open a link, reveal a path in the file manager |
clipboard-manager |
write the clipboard |
updater |
signed updates, through desktop commands with an idle-room guard |
global-shortcut |
Dictate and Conversation from any app, set in Settings › General (voice.md) |
Closing the window hides it; the process, the teammates and the schedules
stay. The tray is how the person gets the window back and how they actually
quit. There is no setting for this: a teammate mid-build that dies because
someone closed a window is the failure this exists to stop. The menu is
two items, Open Hotline and Quit Hotline, with a separator between them. On
Windows a left click on the icon opens the window; on macOS a left click
shows the menu, the platform's convention; on Linux Tauri 2 does not emit
tray clicks (AppIndicator), so the menu is the way back there. On macOS,
clicking the dock icon of a running app with no visible window brings the
window back; the App menu's Quit still exits. Linux needs
libayatana-appindicator3 at runtime. macOS and Windows are built,
unproven until run there.
The macOS menu (Cmd, as the window's own listener is on a Mac; Ctrl
elsewhere): Settings Cmd+,, Search Cmd+F, New Teammate Cmd+N, Team
Cmd+B, Teammate Cmd+I, Teammate 1–9 Cmd+1…Cmd+9. The App
menu is Settings, About, Quit. Help opens Keyboard shortcuts, About Hotline,
and Hotline on GitHub. Where there is no menu bar, the same three help items
sit under the More button beside Settings at the foot of the rail, and
the chords are the window's own. Keyboard shortcuts lists every chord in
ui/src/chords.ts, and with them the two shortcuts that work from any app,
Dictate and Conversation, at the keys set for them in Settings › General.
The app icon is assets/hotline-tile.svg: the mark from assets/hotline-mark.svg
on a dark rounded tile, in the page's own colours. make icons runs
cargo tauri icon on it and writes every size the bundler wants into
crates/hotline-app/icons/, then drops the Android and iOS sets it also
produces; the PNGs are tracked so a checkout builds without the CLI's
rasteriser. The first PNG in tauri.conf.json's icon list is the window's
own icon on Linux, which is why the 128px one leads it: X drops an icon
larger than a quarter megabyte, and 256px is a few bytes over. The same
target also renders the tray from the plain toad, assets/hotline-mark-plain.svg,
the mark without its handset, as the titlebar wears it:
icons/tray.png is the mark at 32×32 in the accent on transparent, for
Linux and Windows; icons/tray-template.png is the mark at 44×44 in solid
black on transparent, for macOS as a template image. In the page the same
drawing is ui/src/ui/HotlineMark.tsx, from the receiver geometry in
ui/src/ui/receiver.ts.
The page is ui/. The design system is written down in ui/design.md
and spelled as tokens in ui/src/tokens.css — five planes of one cool
hue, IBM Plex Sans and Mono, a 4px grid, six type sizes, hairlines of one
device pixel, and green as the one signal colour; ui/src/ui holds its
components (Avatar, Band, Menu). A colour or a face is always a token,
never a literal in a component. Settings, New
Teammate, Keyboard shortcuts and About are panes that replace the
conversation, not a card over it. Up to three teammates can be pinned
(persona.pin, stored as the room setting pinnedTeammates and carried on the
roster as pin): they leave the list and sit at the top of the rail as larger
faces with the name under each, stacked above a hairline in the faces-only
rail, with the same status, unread and busy marks. They reorder by dragging, or
Move left / right in the row's context menu, and the Teammate 1–9 chords
count pins first, then the list in the order it is shown. The list under the
pins is the desk's own order once anyone arranges it, by dragging a row or
Move up / down in its menu (persona.arrange, stored as the room setting
teamOrder and carried on the roster as place); every window of the desk
shows it. Until then it is the roster's order. A teammate the desk has not
placed, a new one say, goes after the placed ones, and a placed teammate
waiting on the person keeps its place and shows its mark rather than moving
to the top (arranged in ui/src/pins.ts, the one place that rule lives).
With several desks in the rail, a row moves only among its own desk's rows,
and the desks' lists interleave by who is waiting, then who spoke last, each
keeping its own order. The desk filter shows a desk's rows whole or not at
all, so a move is always made against the whole of its desk's list. Faces and
rows are dragged with pointer events (ui/src/railDrag.ts), not the page's
drag and drop, which the window keeps for files dropped on it. While Settings is open the rail is its
sections — General, Providers, Tools, Computer, Updates, Import — with a back key in its band
where the team's plus was, and the pane shows one section at a time. The
conversation's menu sits beside the
conversation, with the teammate's settings a page of it; search is a popover that hangs under the band over the
conversation already on screen. Band is the chrome strip: it drags the
window, and a double-click maximises.
HOTLINE_DATA_DIR overrides the data directory when it is set and not blank.
make dev points it at .hotline-dev in the checkout so nothing done in a
dev instance reaches real data. .hotline-dev is gitignored.
Without the override, the directory is the platform's application-support
path: ~/Library/Application Support/Hotline on macOS, %APPDATA%\Hotline on
Windows, and ${XDG_DATA_HOME:-~/.local/share}/hotline on Linux.
The vault is <data dir>/vault/: secrets.json for pasted API keys,
vault/logins/<id>/ for login tokens (the files Rig
writes, pre-created owner-only), Grok's atomically replaced OAuth tokens,
OpenRouter's acquired key, and discovered
model ids for each connection, and vault/mcp/<server>.json for an HTTP
MCP server's protected OAuth registration and tokens. MCP records are bound
to the configured server URL and authorization issuer; they never enter
settings, streams, tapes or agent descriptors.
Tests use temporary directories of their own. Never point a test, a
harness, or HOTLINE_DATA_DIR at a real Hotline data directory.
The app's own output — [startup] lines, an agent that would not start, a
panic — goes to <data dir>/logs/hotline.log whenever its stderr is not a
terminal, which is every launch from the Finder, the Start menu or a desktop
launcher, where it would otherwise be lost (hotline_core::log_file). The
process's stdout and stderr are pointed at the file itself, so everything
printed with eprintln! and the panic hook's message land there, and nothing
is buffered in the process. The file is capped at 5 MB: it is moved to
hotline.log.1 at launch and every five minutes once it reaches that, and
only that one previous file is kept. Started from a terminal, as make dev
and running the bundle's binary by hand do, the output stays in the terminal
and no log is written. Nothing secret is printed, so nothing secret is logged:
keep it that way, and never eprintln! a key, a token or a request body.
hotline serve logs to its journal.
One desk runs per data directory. Before the room opens, every process
that writes it — the app, hotline serve, hotline-import — takes an
exclusive lock on desk.lock there (hotline_support::room_lock), in every
build; a file system that cannot lock is an error, not an unguarded room.
The app also writes, beside it, the loopback port it answers on to
desk.wake: a second launch finds the lock held, asks the running desk to
show its window, and exits once that desk says it has. Two desks on one
room would both fire its schedules, both answer its phones and both write
its streams. The system releases the lock however the process ends, and the
file is never removed. A desk that holds the lock without answering is
waited on for twenty seconds, because a restart after an update starts the
new process while the old one is still leaving, and a desk that is still
opening answers only once its window exists. After that the launch exits
and the room stays with the desk that has it. A desk on another data
directory is another room and runs alongside, which is how make dev runs
next to the installed app: it uses .hotline-dev. The app's half is
crates/hotline-app/src/instance.rs.
A room records its secret store in store.json — native for the app,
file for hotline serve --store file — and a desk started on the other
store refuses it (credentials::claim_backend). A room from before the
marker, with a vault, is a keychain room.
A teammate with computer.enabled gets a container Hotline starts on session
start. The runtimes Hotline looks for, in detection order then ranked
rootless-available first:
| id | CLI | where |
|---|---|---|
docker |
docker |
Linux and macOS |
podman |
podman |
Linux and macOS |
container |
Apple container |
macOS only |
On macOS, desktop startup restores PATH from the user's interactive login
shell before starting the core. This covers shell-managed Node installations
and ACP harnesses as well as Docker credential helpers inherited by child
processes. Shell startup has a five-second limit; failure retains the inherited
path and adds the standard Homebrew, local CLI, and Docker Desktop directories.
Detection is version (available or a reason) then info (rootless).
Binaries are resolved on PATH plus /usr/local/bin, /opt/homebrew/bin
and ~/.local/bin, because a packaged Mac app's GUI PATH is the bare
system one. The user's pick is the room setting computerRuntime; absent
means the first available. The image is the teammate's or the room's pin,
or else the newest published release at or above the floor
COMPUTER_VERSION in crates/hotline-core/src/computer.rs, and the
floor itself when nothing newer is known (computer.md), at
ghcr.io/1broseidon/hotline-computer:<release>. Never latest. Tests use a fake runtime script in a temp dir; they do not talk
to a real daemon.
The create line is --cap-drop=ALL, --security-opt no-new-privileges,
--pids-limit and --memory from persona.computer (1024 and 4g when
absent), --shm-size 1g, the loopback port for 8787, the token in the
environment and the host's TZ, then the mounts: the named volumes
hotline-home-<persona id>:/home/agent, hotline-nix-glibc:/nix and
hotline-src-<persona id>:/home/agent/src (Docker and Podman only), the
teammate's persona.computer.mounts as host:path[:ro], and the room's
cwd at /home/agent/workspace. mount_args refuses a host folder that
does not exist and a container path that overlaps the workspace, the
scratch or the store.
Each wire type is defined once in Rust, with serde and ts-rs, in
crates/hotline-contract, a file per concern, each re-exported from its
lib.rs. The crate depends on no other Hotline crate, and hotline-core
re-exports it as contract, so hotline_core::contract::X names every one;
the types that belong to Remote, linked desks and the importer are
re-exported again from those modules. cargo test -p hotline-contract runs
the export tests and writes ui/src/generated/contract.ts.
nextest does not run that crate: see The Rust tests.
.cargo/config.toml points ts-rs at that directory and tells it a 64-bit
integer is a JavaScript number, because every number on this wire arrives
as JSON.parse produces it.
ts-rs starts the file afresh the first time a test process writes it, so
every exported type has to live in the one crate: a type exported from
hotline-core would erase the contract crate's types, or be erased by them.
A filtered run (cargo test session) writes only the types it matched
and leaves a file the window cannot compile against. Run
cargo test -p hotline-contract unfiltered before committing that file;
make check and the pre-commit hook catch it. Never run a filtered test as
the last run.
Hotline Agent's picker is not hand-written. crates/hotline-core/models.json is
a snapshot of models.dev, the catalogue opencode and
pi draw theirs from, cut down to the providers models::WIRING names and
the models a coding agent can use: chat models that call tools, answer in
text only, and are not deprecated. Beside each provider's models it keeps
kinds, what each of that provider's other models is for (image,
speech, transcription, video, embedding, realtime, reranking),
from models.dev's type, absent meaning chat unless the model answers in no
text at all. A live listing often returns those models beside the chat ones
without saying what they are, and models::kind looks them up there. The
core reads it at start with
include_str!; a test refuses a snapshot whose providers are not exactly
the wired ones. A model's reasoning_options becomes efforts: only the
effort type is read (a toggle or budget_tokens option is ignored),
in the order models.dev lists the values.
To refresh it:
cargo run -p hotline-core --bin hotline-models-sync # fetch, filter, rewrite
cargo run -p hotline-core --bin hotline-models-sync -- --from api.json # from a saved copyIt prints what each provider gained and lost against the snapshot it was
built with, then writes the file. Read that diff, run make check, commit.
The metadata snapshot lives in git. Runtime provider discovery supplies
current model IDs independently, and exact catalogue matches enrich those
IDs. A new ID is usable without a snapshot update. Hotline does not download
models.dev at runtime. Persisted discovery and manual additions live with
connection data, so installing a new release cannot replace them.
To add a provider: one Wiring line in models.rs, one Client arm in
driver/rig.rs naming the Rig client that speaks to it, and a sync. The
key form and picker use the trusted provider identity from wiring and the bundled catalogue.
openai-codex is a synthesized provider. models.dev has no ChatGPT
subscription row, so the sync copies the listed models off openai and
clears their per-token price. A subscription has no per-token price; an id
openai lacks is an error from the sync, so the list cannot drift
silently. That list is only the fallback until a ChatGPT sign-in refreshes.
A connected sign-in lists its models live, and an id it lists that
CHATGPT_MODELS lacks is read from openai the same way, price cleared
(models::model_of), so a model ChatGPT adds has its efforts and limits
before the next sync. Still mirror CHATGPT_MODELS from the Codex model list
when you sync: it is what a picker offers before anyone signs in.
Ollama Local is the other exception: its catalogue row has no fixed models.
Hotline reads the installed ids and their capabilities from the chosen
server's /api/tags on connection and refresh. Ollama Cloud has a bundled models.dev list as a fallback, replaced
by discovery once available. providers.rs contains the connection work
Rig does not supply (OpenRouter PKCE and URL validation); providers/xai.rs
adds Grok's device sign-in and a refresh wrapper around Rig's HTTP client.
The device protocol follows Pi's xAI implementation
and the Grok CLI authentication guide.
The public device client id is not a secret; requests identify Hotline as their
referrer. OAuth response bodies never enter user-facing errors. Model requests
still go through Rig. credentialKinds lists all connection methods a
provider offers, while each saved credential retains its own singular kind.
Active provider connections can refresh models through native Rig listing
clients. The validated list lives in vault/logins/<credential-id>/discovery.json;
manual-models.json holds separate user additions. Legacy models.json ID
lists remain readable. A valid discovery file takes precedence; neither
file is overwritten by installing a new application bundle. Live model names
and limits take precedence over exact bundled matches; the catalogue fills
missing fields, including efforts, capabilities and pricing. Provider identity
still comes from trusted wiring, not live owned_by fields or display names.
The openai-compatible catalogue row is also empty. Each custom connection
supplies its own model IDs, optionally discovered with Rig's model-listing
client, and gets a stable custom-<uuid> provider id. providers/custom.rs
uses a Rig provider builder solely to allow keyless servers; both inference
protocols retain Rig's native request, tool-call and streaming implementation.
Custom API keys are endpoint-bound records in the private credential's
auth.json, while the API choice and model IDs are ordinary metadata.
The house proof is a headless harness that starts the real core and drives
it over the wire. Each file under crates/hotline-core/tests/ opens a Desk
on a temporary directory, binds a Door with a token only the harness
knows, and speaks WebSocket JSON the way the window does:
ws://127.0.0.1:<port>/ws?token=….
| file | what it proves |
|---|---|
desk.rs |
a teammate over the wire; a peer thread listed, streamed and marked read; a Hotline Agent turn with a real key; an ACP child turn |
mcp.rs |
Hotline as an MCP client and as the server of a teammate's own tools: a granted echo server, Hotline's seven tools, a policy of none, a server that will not start, a non-string env, a vanished server, a stdio process group |
schedule.rs |
a job created, listed, silenced and cancelled, remembered on the room stream; a loop carries every and has no when |
The OAuth unit harness in crates/hotline-core/src/mcp/tests.rs runs a
loopback protected-resource and authorization server, through the vault, through metadata discovery, DCR, PKCE callback, token
refresh and authenticated MCP calls. It also covers restart reuse, denied and
wrong-state callbacks, registration gaps, concurrent refresh, URL binding,
sign-out and the protected vault boundary, and which addresses a sign-in may
connect to, with DNS answered from a table through hotline-mcp's
test-support feature. No real provider account is used by the test suite,
and no name is looked up off this computer.
Most of desk.rs needs no provider key: it creates a teammate, watches
the roster view, lists models, adds a credential, lists and marks a peer
thread, and so on. The tests that need a real agent are ignored, and run
with --ignored, failing by name when their env is missing. One starts a
Hotline Agent turn with a real key in HOTLINE_HARNESS_ANTHROPIC_KEY, has it
read a file, and checks the tape. The others are the same proof for the
other kind of agent: set HOTLINE_HARNESS_ACP to a backend id this machine
can run (cursor, say) and they drive a real harness as a child, including
a line sent mid-turn.
HOTLINE_HARNESS_ANTHROPIC_KEY=… cargo test -p hotline-core --test integration -- --ignored a_turn_with_a_real_key
HOTLINE_HARNESS_ACP=cursor cargo test -p hotline-core --test integration -- --ignored real_acp_harnessA harness that wants state in a stream asks the core over the wire, or writes the file before the core starts. The core is the only process that appends to a stream.
A test waits on the thing it is waiting for, never on a sleep it hopes is
long enough: common::until(what, cond) in a harness, and
test_support::until(what, cond) in a unit test, each giving up after one
generous minute with what in the failure. A loaded runner only makes them
slower, so a test asserts what happened and in what order, never how fast.
cargo run -p hotline-core --bin hotline-import -- <from> <to>Reads the previous edition's layout at <from> and writes this tree's
streams and vault at <to>. The source is never written: store.sqlite
is copied (the database and its -wal, never the -shm) into a private
temporary directory so SQLite cannot leave sidecars beside a directory it
must not write, and a copy that does not check out is an error rather
than a smaller roster. Tapes are copied, secrets are read out of the old
vault. A teammate already in the roster, a tape that already exists
here, and a setting already set (a tombstone is not a set setting) are
left alone, so running it twice is the same as running it once.
mcpServers comes over when the shape is one this tree accepts; an
entry it cannot read is named on notes and the rest of the list still
lands. A key this Hotline does not have is skipped with a row, not dropped
in silence.
Success prints a JSON report (teammates, tapes, threads,
schedules, settings, keys, skipped, notes) and exits 0. A
failure prints the error and exits 1. Wrong arguments print
usage: hotline-import <from> <to> and exit 2. The two paths must not
resolve to the same directory, and <to> must not live inside <from>.
The same importer is the room.import command on the wire. Imported
teammates keep their working directories under the old data directory's
workspaces/, by design: the workspace is the teammate's project, not
something the importer copies. Backend ids are mapped onto this tree's
registry (the previous edition's DEFAULT table — pi, cursor, opencode,
gemini, claude-acp, codex-acp — already matches the hand-taught
ids here). An id this build has no harness for is kept as written, and
the report notes it so the session can refuse that start in a sentence.
A search index that cannot be written is the same kind of note: the
index is rebuildable, and the next start will catch up.