Skip to content

CLUSTER

throndir edited this page Nov 14, 2026 · 1 revision

One Martlet on all your computers

Status: Implemented Last Updated: 2026-11-13 Audience: Developers and coding agents Last verified: 2026-11-13 against b1688a8de Code: src/Martlet.Core/, src/Martlet.Gateway/, src/Martlet.HostClient/, src/Martlet.Desktop/, deploy/host/, workers/

Martlet is one app that lives on all your computers. Install it on another PC and it is the same Martlet: the same companion with the same personality, settings, memories, people, voices and characters, the same Home Assistant and the same API keys. Each computer is either a companion PC (where you talk to Martlet) or a host PC (it lends its graphics card), and you can switch a computer between the two in one click, on that computer or from any other (Switching another computer). Adding a host to your Martlet network adds what it can do (thinking, listening, speaking, lip-sync, Home Assistant, keeping everyone's logs) to the whole app; jobs move between hosts on the spot and fail over when a host stops answering.

What differs from one computer to the next is only what belongs to that computer itself: its microphone, speakers and cameras, its screens (where the character and its speech bubble sit), whether it is a companion or a host PC, how it starts, what it installed (Ollama models, Parakeet, a whisper package, MCP servers, the terminal it may use) and its own security choices. See What stays with each computer.

Everything travels through your paired hosts: each keeps a private copy and hands it only to your paired computers over their pinned, signed connection. Hosts never talk to each other, so desktops carry changes between them. It is on by default; one switch, Devices > Settings for all devices > Keep Martlet the same on all my computers, turns all of it off (each computer then keeps its own choices and memories, and a change made meanwhile is shared, with its time, when you turn it on again). The people Martlet recognizes by voice are the exception: they are always shared, so Martlet learns everyone's voice (The shared voice list). Failover stays a per-job Fail over to another host choice.

The same on every computer How it travels Details
Who does each job (thinking, listening, speaking, lip-sync) The cluster plan Model
How Martlet thinks, listens and speaks with the API keys, the Thinking fallback, the Thinking pool's cloud providers and servers with their keys, the personality, replies, prompts, memory on or off, lorebooks, the character and its emotes and motions, how you talk, speech bubbles and subtitles, the theme, recognizing voices, Voice ID, what Martlet may do with Home Assistant, app updates Shared settings One Martlet on every computer
What Martlet remembers Shared memories MEMORY
The people and voices Martlet recognizes The shared voice list, always on (not changed by the switch) The shared voice list
The voices Martlet speaks with and their recordings Shared speaking voices The shared speaking voices
Your characters (Live2D and VRM models) Shared character models The shared character models
The Home Assistant connection Shared Home Assistant The shared Home Assistant connection
Which computers belong, API keys for other apps, commands between computers, logs Always on: the network, API keys, commands, shared logs Security and diagnostics, not settings

Model

  • Nodes are your paired Martlet hosts (each runs the gateway) and the companion desktops that use them. Desktops are the only consumers of the jobs; hosts run the roles (Ollama, whisper, F5, Audio2Face). A host a friend shares with one of your computers is never a node: that computer uses it for a job on its own, the plan never records or moves that choice, and your other computers keep the plan's (sharing a host with friends).
  • The shared configuration is the cluster plan (Martlet.Core.Cluster):
    • one entry per job (thinking, listening, speaking, lip-sync): the host in charge, or no host (the job's shared route, or this PC for lip-sync), or nobody (lip-sync by voice loudness); whether it fails over; and moved_from, the host a failover moved it away from;
    • one entry per host: its address and the roles (with models) it was last seen running, or a removed tombstone after you forget it.
    • the logs entry, left by desktops older than shared logs: the single host they send every computer's logs to. Newer desktops share logs with every host and never set or use it; it is not a role and never moves or fails over.
  • Every entry is a last-writer-wins register stamped with a hybrid revision, max(newest revision known + 1, current Unix milliseconds), and the writer's device ID. Merging keeps, per job and per host, the entry with the highest (revision, writer, content). The merge is commutative, associative and idempotent, so every copy converges whatever order changes arrive in. A computer that already saw a newer change always stamps above it; but two changes made without seeing each other are ordered by each computer's own clock, so a computer whose clock runs ahead can win over a later change.
  • The plan holds no secrets or conversation data: host IDs, HTTPS origins, model names, flags and stamps only. JSON, snake case, schema 1, at most 16 KiB, 8 jobs and 32 hosts; unknown fields and newer schemas are rejected.- Background work across computers is the speaking computer's own choice, not a job in the plan. Companion › Background thinking may think on several paired computers at once (each one with a Thinking model joins by itself: its Thinking pool role, or its Ollama when that doesn't do this PC's Thinking; unticking In the Thinking pool keeps one out; thinking-pool.json on that PC; its cloud providers and servers, with their keys, are the shared thinking-pool setting). The computer you talk to keeps answering; each background think goes to a free one of those computers, the one sharing least with the conversation first (one doing none of its jobs before one that also speaks, before the computer doing Thinking), so with four computers one speaks and three think about three things at once. A member whose computer stops answering (the device sync check, or a pool job that can't reach it) gets no new work, and its slots leave the pool until it answers again; work waiting in line then starts there (Computers that go offline). Each result comes back to the speaking computer and is brought into its conversation as usual. Other kinds of background work use the same placement (BackgroundPlaces; see Background job API). The talk window, background-jobs.json and the desktop log name the computer each job runs on.

Where copies live and how they sync

Copy Location Written by
Each host cluster.json beside host.json (0600, gateway service owner). Not part of the approved configuration, so role changes never need re-approval The gateway, when a paired desktop merges into it
Each desktop cluster.json in Martlet's data folder; the on/off choice in cluster-sync.txt (missing means on; only off turns sync off) Martlet

The gateway serves GET /martlet/v1/cluster (its copy) and POST /martlet/v1/cluster (merge a copy in, return the merged result) to any paired device over its pinned, signed connection. The host never acts on the plan. Hosts do not talk to each other: desktops carry changes between them, so no new host-to-host trust exists. Since the desktops are the only users of the jobs, a job never needs to move while no desktop runs. Which desktops a host trusts at all is the Martlet network: pair a host once and every member desktop pairs with it by itself.

While sync is on, every 15 seconds (and right after any change or Check hosts) the desktop:

  1. notices jobs changed elsewhere in Martlet (for example in Setup) and records them as its newest choice;
  2. checks every paired host: its routes and its copy of the plan;
  3. merges every copy into its own and adds any job nobody has recorded yet from what this PC does now, when that is a real choice (a host does it, or lip-sync is off). A computer that just joined never records Martlet's defaults, so they can't override what your other computers chose when the plan reaches it a check later (before this, a new PC's default Setup choice could replace the host your computers used);
  4. records the roles each reachable host runs;
  5. applies failover (below);
  6. follows the plan: each job moves to the planned host with this PC's own pairing, or back to the job's shared route (or, when this PC can't use it yet, its own saved Setup choice); an open conversation window reloads when idle;
  7. merges its copy into every reachable host whose copy differs.

A host counts as not answering only after it misses two consecutive checks (about 30 seconds), as for failover: one slow answer from a busy host keeps its last status, and a host that answers with its routes but is late with its copy of the plan still answers. The desktop log says each change once: Host gpu-box stopped answering: ... (or didn't answer when it never answered since Martlet started) when it goes, and Host gpu-box answers again. when it is back. MCP host_connections_selftest rehearses this on loopback.

Changes made on this PC (the Devices page, Setup, forgetting a host, failover choices) are recorded immediately, even while sync is off, so turning sync on later keeps whichever change is actually newest. The same holds for computers updated from a version where sync was off by default: on their first check they adopt the newest change from any computer.

A PC set up as a host (Use as a Martlet host) uses no jobs, so it only takes steps 2, 3 and 7: it receives the plan (so it shows who does what) and passes it on. It never fails over or follows a job, and records only a job that was set up to run on it (below). Its Devices map draws each job where the plan puts it for your companion PCs (on the host that does it, on the cloud service of the shared route, or on the companion PCs for a route that runs on each of them), so it shows the same picture as your main PC rather than the Setup choice it kept from before it became a host. Before this, a host PC skipped the sync entirely.

The computer a job was set up on does it

Martlet is one app: a job set up on one computer is done by that computer for all of them, whether it is a companion or a host PC, so a computer you make the companion later (or one you just added) uses it rather than needing its own copy. Thinking with Ollama on this PC on a computer that runs a host service of its own (paired here, or a host PC's own) counts as that computer doing Thinking through its host service: the plan names its host (diva-host), every other computer follows it like any host, and the computer itself keeps talking to its own Ollama directly, so its replies never take the extra hop.

  • Choosing This PC for Thinking on such a computer records it at once.
  • A setup made before this (the shared thinking route is Ollama on the computer itself, chosen on that computer, while the plan leaves Thinking to each computer's own choice) is taken on by that computer on its next check, as a companion or a host PC. A plan entry newer than its last look at the shared settings waits a check, so a change made elsewhere (a cloud provider, say) is seen first and wins.
  • Its host service needs the Ollama role for the others to use it. Until then they keep what they use now and their Companion › Thinking says why; the computer's own Devices row says to add Ollama to its host service, and a host PC's Home puts Add Ollama first under Add roles (Your computers use this PC for thinking, so add Ollama here). Its model can differ from the computer's own Ollama model.
  • Companion › Thinking, Voice and Listening on a computer that hasn't followed yet show Another of your computers and the network's host (Your Martlet network does thinking on diva-host, as chosen on desktop-diva. This PC switches to it as soon as it can: pair diva-host with this PC first.), not Martlet's default This PC.
  • Listening and Speaking on This PC can already run through the computer's own host service, and then the plan names it the same way. Parakeet or whisper inside Martlet runs on each companion PC.

Sharing work between your computers

The plan gives each job one computer, but a computer runs one voice, one Thinking reply and one transcription at a time: its gateway turns a second request away at once (job.busy). Before this, a companion PC whose voice computer was busy speaking for another companion PC lost that sentence. Each job's own page now lists the machines that do it, in order (Pools): Companion › Voice for Speaking, Companion › Listening for Listening and Companion › Thinking (When the Thinking model is busy) for Thinking. The lists are the same on all your computers (pools.json, the pools shared setting). Devices › Sharing work shows what each list holds, with a button that opens its page, and keeps the Thinking pool's own choices (work-sharing.json).

Each request goes through Martlet's queue (WorkQueue, Martlet.Core.Cluster):

  1. It goes to the first computer in its order. While that computer is free nothing changes: no extra request, no added latency.
  2. A computer that is busy, or doesn't answer, or no longer runs the engine, is passed over for the next in order at once.
  3. When every one is busy, the request waits in line and tries them again in order every 100 ms and whenever one of this PC's own requests finishes, so whichever computer frees first takes it (up to the request's deadline).
  4. A computer this PC already has a request running on goes last for its next one, saving a round trip it would only refuse.
  5. The live turn goes first (WorkPriority). A background request (remembering or naming on the conversation's own model, a Thinking pool job on a host's Ollama role) waits while a live request of its job waits, and a live request that finds a computer busy with this PC's own background request stops that request (WorkPreemptedException, which its caller treats as "go on later") and takes the computer as soon as it is free. A host that keeps its graphics card for a live turn refuses background work with job.busy and detail live, or stops it with job.preempted: that is WorkRefusal.Preempted, never a failure (live floor).

The order is deterministic and costs nothing: the list's members that run the job's engine (the same voice engine for Speaking; the same model for Thinking), from this PC's files (PoolRouting.Hosts). this-pc is each companion PC's own host service. A computer kept for other companion PCs, a member that is off and a computer that doesn't run the engine are left out. On each list you can:

Choice Effect
On (untick) The member takes no work and keeps its settings. With no member on, Speaking and Listening are off: Martlet turns their route off (no voice, or typing only), and turns it on again when a member is on
Up / Down Sets the order every companion PC tries the members in. Speaking and Listening: the first member that is on is the route the conversation uses; when it becomes a different kind of place (a computer after a cloud provider), Martlet switches the route the way the place's own Use button does
Remove Takes the member out of the list
Settings Shows the member's own settings: Change model on a computer, and the place's own card under the list (voice engine, speech recognizer, cloud provider with its key and consent)
Every companion PC / Only Keeps the member for one companion PC: no other companion PC sends it work
Add to the list This PC, each paired computer and a cloud provider (set up under the list; Use puts it first, and Down moves it to its turn). Areas that take graphics cards (lip-sync, vision, hearing...) also offer each card of a computer with two or more

Thinking is different: the conversation's own model always goes first, so nothing changes while it is free and no latency is added. Its list holds only the computers a reply may go to when that model is busy, and it is empty by default: another computer's model starts your conversation without its prompt cache (a later first word) and pushes that computer's own conversation out of its cache.

The first time a computer starts with this version, it makes the Speaking, Listening and Thinking lists from Devices › Sharing work's choices and each job's route (PoolMigration.FromWorkSharing): the chosen order (own computer first becomes this-pc first), the route's computer, this PC's own host service, then the other computers that run the engine; a computer unticked for the job is left out; a computer kept for one companion PC keeps that. A list another computer already shared is kept. A list with nothing in it is not made, so a new computer never shares an empty list over another computer's choices. Deep thinking keeps its own places (Companion › Background thinking), and its Use and Keep a computer for one companion PC choices stay on Devices › Sharing work.

For the four computers in the example (machines 1 and 3 companions with Chatterbox, machine 2 a companion without a voice, machine 4 for lip-sync and pictures) with the Speaking list this-pc, machine 1, machine 3: machine 1 speaks on its own Chatterbox, machine 3 on its own, and machine 2 on machine 1, or machine 3 when machine 1 is busy, or whichever of the two finishes first when both are. Keeping machine 3 for itself leaves machine 2 only machine 1.

A cloud member of Speaking or Listening takes a request in its turn (PoolCloud, PoolRouting.Stops). When the members before it are busy or don't answer, the request goes to it through the same queue, under its member key. A free first member takes the request at once, so the cloud member adds no latency and is never asked. It uses its own key: the credential ID in pool-keys.json (recorded when its route was in use on this PC), else the key of the route the job kept aside when it moved to a computer. It also uses the owner's agreement recorded on the member. OpenAI and ElevenLabs voices give the same 24 kHz mono PCM16 as a host's voice, and OpenAI transcribes the same 16 kHz recording. A rate limit (429) counts as busy; a missing key, a refused key, an exhausted quota or an outage counts as not answering. A cloud member without its key on this PC says so on the list and is skipped. When a cloud member is first, the route is that provider and the conversation calls it directly. Speaking, Listening and Thinking take one row per computer and no graphics card: a host runs one route per engine. Lip-sync goes to a pool of the places that run Audio2Face through the same queue, without a card here (the lip-sync pool). Pictures go through each PC's Picture making list (PictureMakingPool, lane pictures): a computer whose ComfyUI already draws a picture is passed over for a free one, and when all are busy the picture waits in the shortest queue (Picture making). Songs go through two pools: their music through the singing pool (SingingPool, lane singing) and their voice match through the voice match pool (lane voice-match), which may be other computers. In each, a computer that makes another job is passed over for a free one, and when all are busy the job waits on the shortest line (Singing). Reading the screen goes through each PC's Reading list on Companion › Reading (lane reading): Windows OCR on this PC and your computers' Reading role, in order (the Reading pool). Recognizing who speaks goes through the Voice recognition list on Companion › People (lane voice-recognition): your computers' Voice recognition role and this PC's processor, which always takes it when no computer answers in time (where voice recognition runs). Thinking with Ollama on a companion PC itself talks to that Ollama directly, so the queue can't see those replies; Ollama queues them. The Devices card's status line (WorkSharingStatus) and the desktop log (Sharing work: Speaking went to m3-host (1 busy) after 240 ms.) say when a request went elsewhere. Qualification: the planner, queue, lists, their migration and the pages are checked locally (WorkSharingTests, WorkSharingRosterTests, PoolsTests, MCP work_sharing_status, work_sharing_check and Companion › Voice, Thinking and Devices › Sharing work through -Desktop); requests between real hosts are NOT RUN.

Recommended setup. Home's recommended setup for all your computers plans who does each job, the Speaking and Listening pools above and the Thinking pool from the hardware of every computer. It keeps companion PCs light and never adds conversation latency. See Recommended setup for all your computers.

Pools: one ordered list of members per area

Each area whose requests can go to more than one place (Speaking, Listening, Thinking, lip-sync, pictures, singing, vision, hearing, reading, motion and voice recognition) uses one contract, Martlet.Core.Cluster.Pools (src\Martlet.Core\Cluster\Pools.cs). The area's own page shows and edits its list. There is no separate on/off switch and no single-computer choice.

Part Contract
Member (PoolMember) this-pc (each companion PC itself), computer (a paired host; it picks the card), gpu (one card of a paired host, card 1 to 8), address (a service the owner runs at an http or https address) or cloud (a provider, its origin and its model)
Member key (PoolMember.Key) this-pc, host:<id>, host:<id>#gpu<n>, address:<url>, cloud:<provider>[@<origin>][/<model>]. The key is the member's "computer" in WorkQueue
Per-member settings PoolMember.Settings: the area's technology choices (engine, model, voice, workflow, slots), nonsecret. Shared key names are in PoolSettingKeys; an area can add its own keys
Order The list order is the order a request tries the members in
On and off A member that is off keeps its place and its settings and takes no work
Kept for PoolMember.OnlyFor: the companion PCs (device IDs) that may use the member; empty means every one
Empty list An optional area is off when no member is on. A required area (PoolArea.Required) then runs its fallback on this PC's processor (PoolArea.Fallback, for example voice loudness for lip-sync; for vision and hearing, Thinking's own model takes the pictures or recordings that go with a reply, while background jobs with a picture or a recording go to Thinking pool models that see or hear, as SENSE_MODELS.md says; for voice recognition, this PC's processor, also when no computer in the list answers in time)
Area (PoolAreas) Its ID (also its WorkQueue lane), page, member kinds, host role, required or optional, shared or per PC. Thinking has ConversationFirst: the conversation's own model always goes first and is not a member
Storage and sync pools.json, the pools shared setting, for areas the same on all computers. pools-local.json (never shared) for Reading, which reads that PC's own screen. The Picture making, Vision and Hearing lists were each PC's own before Martlet 0.89; a computer moves its list once into pools.json when it updates. An area with no list yet makes it once from its older choices (PoolMigration)
Cloud keys Each PC keeps a cloud member's key in Windows Credential Manager; pool-keys.json (never shared) maps area and member key to the credential ID. The keys themselves travel as the pool-keys shared setting (one bundled secret), so a member set up with a key on one computer has it on every computer. Without one, the member borrows the area's own route key for the same provider, or this PC skips it
Cloud consent PoolMember.Consent binds the owner's agreement (data leaves this PC, requests may cost money) to the area and the member key. A cloud member without a matching agreement takes no work
Routing PoolRouting.Order(area, list, device, usable) gives the members to try: on, a kind the area takes, kept for this PC, agreed to and usable now (the area's own check). PoolRouting.Stops(area, list, device, stop) turns them into stops (PoolStop: the member, its paired computer from PoolRouting.HostOf, and its key in WorkQueue), each key once. The request then goes through WorkQueue.Shared with lane area.Id and hostOf = the stop's key
Runner PoolRunner<TStop> (src\Martlet.Core\Cluster\PoolRunner.cs) is the one runner for ordered pools: the first stop that takes the request does it, a busy or unavailable stop is passed over, every stop busy means a wait (RunAsync: for the first stop to free; RunOrWaitInLineAsync: in the shortest of the stops' own lines, for singing hosts and ComfyUI; StreamAsync: a stream such as lip-sync's frames, taken when its first item arrives), and a real failure ends the request. Its result (PoolRun) says which stop took the request, its position and how many stops were busy or unavailable first. Each pool gives only its rules: lane, key, classify, priority and one stop's attempt
Cloud refusals PoolRefusals.Http: 429 and 503 are busy (try the next, then wait); 401, 403, 404, 408 and other 5xx are unavailable (try the next); the rest is a real failure

An area adds itself in four steps:

  1. Set its entry in PoolAreas (kinds, host role, required and fallback, shared or per PC).
  2. Make its first list from its older choices with PoolMigration (or its own code), then save it with PoolSettings.SaveFor.
  3. On the request path, read the list from local files only (cache it and read it again only when the file changed), call PoolRouting.Stops (or PoolRouting.Order), and send the request through PoolRunner<TStop>. When PoolOrder.Fallback is true, run the area's fallback.
  4. Show the list on the area's page with the shared list control, PoolListCard(new PoolListOptions { Area = ..., Status = ..., Settings = ... }) (src\Martlet.Desktop\MainWindow.Pools.cs). Give it each member's state line (Status), its settings editor (Settings), which computers can be added (CanAdd), new members' default settings (NewMember), the cloud add form (AddCloud) and what the area does after a change (Saved). Its automation IDs are Pool-<area>-Summary, -Member-<i>, -On-<i>, -Up-<i>, -Down-<i>, -Remove-<i>, -Settings-<i>, -OnlyFor-<i>, -AddThisPc, -AddHost-<host>, -AddGpu-<host>-<card>, -Address and -AddAddress. On the desktop's request path, read the list with WorkSharingRoster.Shared.Pool(directory, area) or WorkSharingRoster.Shared.PoolMembers(area, usable): both read the file again only when it changed. Save a list only through its store (PoolSettings.SaveFor): the store tells the roster (SettingsFiles.Saved), so the next request reads the new list and the roster raises Changed.

Qualification: the contract, its storage, migration, routing and the queue's handling of member keys are checked locally (PoolsTests). Each area's own move to a pool is qualified in its own change.

Live turn first on a shared graphics card

A host's live work (replies, voices, listening, lip-sync, reading) and its Thinking pool work (the Deep thinking role's own Ollama) can share one graphics card, and then each runs slower: a Chatterbox token takes about 11 ms alone and about 30 ms beside another program on an RTX 4070. Windows has no priority between programs on one card, so the host's gateway keeps it (GPU priority):

  • Each route advertises the cards it runs on (gpus; empty means unknown, the whole host) and its lane (pool for Deep thinking, live for the rest).
  • While a live request runs on a card, or a companion PC holds it for a live turn (ILiveGpuHold, HostLiveGpuHold: hold for 10 s, renew every 5 s, release at the end), a new think there is turned away (job.busy, detail live) and a running one stops at once (job.preempted). The Thinking pool then runs it on another computer or later. Live requests never wait for pool work or holds.
  • Pool work on a card of its own keeps running. On a host with two or more NVIDIA cards, pin each Ollama server to its own GPU (CUDA_VISIBLE_DEVICES): add the Deep thinking role again and choose a card that no live role uses, and give each further card a Thinking pool model of its own (One Thinking pool model per graphics card). martlet-host status, the host log and GET /martlet/v1/priority say when Deep thinking shares a card with live roles.

Qualification: the gateway's arbitration, holds and wire format are checked locally (GpuPriorityTests, MCP gpu_priority_selftest with fixture Ollama servers on loopback); a real GPU, a real Ollama stopping mid-token and a host with two or more cards are NOT RUN.

One Thinking pool model per graphics card

One Ollama server keeps one copy of its model on one graphics card. Its slots (OLLAMA_NUM_PARALLEL) are parallel streams of that one copy, so a second card stays idle. A host with two or more NVIDIA cards therefore runs one Thinking pool model per card, and each card is a Thinking pool member of its own:

Card Host role Route Port Member key
1 deep-thinking martlet.gateway.deep-thinking-chat.v1 11435 host:<id>
2 to 4 deep-thinking-<n> martlet.gateway.deep-thinking-<n>-chat.v1 11434 + n host:<id>#gpu<n>
  • Each extra-card role is a separate Ollama with its own models volume. It needs at least that many NVIDIA cards (min_gpus), and martlet-host pins it to a card that no other Thinking model uses (CUDA_VISIBLE_DEVICES). Martlet offers Thinking pool (card 2) only on a host that reports two or more NVIDIA cards. On Companion › Background thinking, the host's first row has Add a model on card 2.
  • The host's gateway gives each card's route its own slots, its cards (gpus) and the pool lane. A live turn stops pool work only on the card it uses.
  • Each card joins the pool by itself (ThinkingPoolAutoJoin) with its own slots, and it leaves when the host no longer runs a model there. In the pool on the host's first row keeps every card of the computer out.
  • The board places work on each card on its own. A card that doesn't serve the conversation's Thinking route ranks before the card that does. Only the member on the Thinking model's card gets the "shares its graphics card" warning.
  • Card 1 keeps the key and route that every host had before, so saved members and the per-member choices (Quick jobs, Long jobs, Backup for slow replies) stay as they are. A one-card host is unchanged.

The recommended setup keeps an extra card's model where it runs and counts its card as used. It doesn't add or move one by itself.

Qualification: routes, auto-join, the page and the warnings are checked locally (OllamaRelayTests, ConfigurationTests, ThinkingPoolAutoJoinTests, HostRolesTests, MCP thinking_pool_check per GPU steps). A real host with two NVIDIA cards and two Ollama servers is NOT RUN.

Failover

With failover on for a job, when its host misses two consecutive checks (about 30 seconds) the desktop moves the job to another paired host that answered and advertises the job's route (the role is installed and its model ready). Candidates are ranked by fewest other jobs, then most GPU memory (from the host's hardware report), then host ID, so desktops that see the same hosts pick the same one. The move is stamped with moved_from and shared; the row says where it came from.

Failover moves one job for a short time. To plan where every job and host role should run, use Home's Recommended setup. It suggests changes for all your computers, and Reconfigure applies them. When a computer comes back or stays away, a companion PC checks again and asks on Home when a better setup is ready. See Recommended setups.

When a computer goes away or comes back

Device sync's check of every paired host (every 15 seconds while Keep Martlet the same on all my computers is on) and Thinking pool jobs feed one record of which computers answer now (HostPresence in the desktop). It marks a host offline at the first failed check, so the Thinking pool reacts at once. The notices on a companion PC's Home add patience on top of it (PresenceWatch in Martlet.Core.Cluster):

  1. A computer that misses one check and then answers says nothing.
  2. A computer that stays silent for 30 seconds (two checks) is missing. Home shows a warning, Working with less: gpu-box isn't answering, with what it did for you, from the shared plan: the jobs a failover moved ("Martlet moved Speaking to desk-host."), the jobs that stay with it until it is back, the pools it was in (Speaking pool, Listening pool, Thinking pool) and whether they go on with your other computers, and roles no other computer runs. The item ID is presence-missing-<hostId>. The Devices map row says Not answering for N min.
  3. A computer still missing after the time chosen in Settings › Your other computers (Look for a better setup when a computer is away for N minutes: 2 to 60 minutes, 10 by default, kept per PC in node-presence.txt) has stayed away, once per absence. This time only decides when Martlet checks the recommended setup again by itself: Home's Recommended setup always plans without a computer that isn't answering.
  4. A missing computer that answers again for 30 seconds is back. Home shows gpu-box is back with how long it was away and the jobs that a failover moved and that stay where they are. The item ID is presence-back-<hostId>. You can dismiss it, and it clears by itself after 10 minutes.
  5. A computer that flaps (answers again for less than 30 seconds, then goes silent again) stays one absence: it is missing once, stays away once and is back once, when it answers for 30 seconds.

Each of these is an event for the recommended setup on the companion PC: MainWindow.PresenceChanged (PresenceChange(HostId, Name, Kind, At), where Kind is WentMissing, StayedAway or CameBack), raised on the UI thread on a companion PC only. MainWindow.OfflineFor(hostId) says how long a computer hasn't answered. This PC's own host service is left out, because Home has its own item for it. A host PC's Home is the host dashboard and shows none of these. The desktop writes node-presence.json (host IDs, computer names, states and times, and the notices) when a computer's state changes, for the node_presence_status MCP tool. Nothing here runs on the reply path: a 5-second timer on the UI thread does nothing while every computer answers.

Live Thinking while a host is away or a game runs

Failover moves a job in the shared plan, and only when you turned it on. The Host away and While gaming plans (Three plans) move live Thinking on one companion PC only, for a short time, and never change the shared plan or your saved settings:

  1. When the host that runs live Thinking is missing (above), live Thinking uses another paired host that answers and runs a Thinking model (the computers in When the Thinking model is busy first), then the hosted backup (If Thinking fails) unless online services are Never, then Ollama on this PC. When the host is back, live Thinking goes back to it.
  2. While a game runs on a companion PC whose owner said it is used for games, live Thinking on its own card moves the same way, and its model stays loaded while the game leaves room.
  3. The conversation uses the moved route from its next reply (LiveSituation.Current, SituationRoutes). An open talk window switches only when nothing runs and nobody talks, and a reply that has started keeps its route, so a change never slows or stops it. A change to what the route is made from (the host's pairing, the If Thinking fails key) makes it again.
  4. Requests that go through the lists (WorkSharingRoster.Places: Speaking, Listening, Thinking on a host, lip-sync, reading) try a computer that doesn't answer now last, and while a game runs they try this PC's own host service after the other computers that come right after it on the list. A cloud member never moves ahead of it.

The desktop writes situation.json when the situation changes, for the situation_status MCP tool.

Edge cases

Case Behavior
No other host runs the engine The job stays; its row says no other paired host can take over. It never falls back to a cloud provider or this PC's Setup choice by itself
Failover off The job stays; its row on the Devices page says the host is not doing it and offers failover
This PC reaches no host at all No failover: its own network is the likelier problem
Host answers but lost the role (removed, model gone) Counts as not serving the job, like an unreachable host
Flapping host Two consecutive misses are needed; a moved job never moves back by itself (no ping-pong). Choose the original host again to move it back
Two desktops fail over at once Same ranking, so normally the same target; otherwise the newest stamp wins everywhere within a check
Change made on another desktop Followed within a check; the status line names the computer that chose it
Planned host not paired with this PC This PC keeps its current route and its row says to pair that host here; the shared plan is not overwritten. A host of your Martlet network is paired by itself within a minute, so this lasts only until then
Speaking moves to another F5 host The applied reference voice is reused (same f5-host destination), and the new host already holds its recording (shared speaking voices). A desktop without a voice keeps its route and asks you to add one
Another computer switches the voice engine on the speaking host A host runs one voice engine at a time, so the engine Speaking used there stops. Every other computer follows the engine the host runs now on its next check (its own engine choice, speaking-engine.txt, follows too) and keeps the voice chosen on all computers, so all of them speak with the same engine. Failover then looks for another host with that engine
A role's model changes on a host that does a job (Change model, Change ... settings) The host keeps serving the old model until the new one is ready. Then every computer whose job (or Deep thinking) stays on that host saves the route again with the new model on its next check, since a route names its model and the host answers only for the one it serves. Speaking keeps its voice
Host model differs The new route records the model the host advertises; the failover confirmation says the model may differ
Host older than cluster sync Still usable and a failover candidate; it keeps no copy, and the status line suggests Update host
New host paired It receives the plan and appears as a node on the next check
New computer joins, or one becomes the companion It follows the plan (the hosts your computers use) once paired; its own defaults are never recorded over it
Thinking set up on a companion PC that becomes a host PC It keeps doing Thinking for your computers through its host service (above); its Home asks for the Ollama role when its host service lacks it
Host forgotten here Its node gets a tombstone; a desktop still paired with it re-adds it
Unreadable or malformed copy A desktop starts empty and a host ignores it; both are restored from the other copies
User change racing a check Checks never follow while a role change runs, and user changes always merge into the newest plan
Settings changed during a follow The save conflicts and nothing changes; the next check retries
Newer plan schema Rejected by older hosts (they keep theirs); update hosts to the desktop's version

Qualification

Merge rules, the endpoint (in-process, including signing and rejection) and failover ranking were checked locally. Multi-host failover on real hosts and networks is NOT RUN.

One Martlet on every computer

The plan above says who does each job. What a job uses when no host does it, and everything else that makes Martlet the same companion, travels as shared settings through the same paired hosts, so any of your computers can be the companion (or a host) and Martlet stays familiar on all of them. Before this, a job nobody's host did used each desktop's own Setup choice: a PC switched to OpenRouter kept OpenRouter, while the other PC, made the companion later, kept NVIDIA Build and its old key.

Shared setting What travels Stays with each computer
thinking, listening, speaking The route a job uses when no paired host does it: provider (OpenAI, OpenRouter, NVIDIA Build or any OpenAI-compatible server, Ollama on the computer itself, Windows speech, Parakeet), model, voice and the API key Host routes and pairings (the plan above); a local whisper package
thinking-fallback The If Thinking fails endpoint, model and its own key (or none)
thinking-pool Companion › Background thinking's cloud providers and servers on your network (for example NVIDIA Build or OpenRouter models): each one's address, model, order, on or off, slots, Quick jobs, Long jobs, pictures and recordings, Backup for slow replies, Smarts and its API key (the distinct keys travel together as one secret). A key this PC already holds for the same address is used again; a member removed elsewhere is removed here with its key Paired computers in the pool (each PC's own pairing; they join by themselves) and models in Ollama on this PC; Runs on
thinking-pool-choices Companion › Background thinking's pool-wide choices: Backup for slow replies (Backup Thinking) and its wait, Busy pool (higher priority first, more important after stops, tries again) and Use the conversation's model when the pool is empty. It is a separate setting, so a choice changed on one PC never replaces the cloud models of another Runs on (it can name this PC's own models) and the machines' own boxes
companion The personalities (same IDs, so lorebooks stay linked) and which one is used
replies, prompts, memory Reply settings, edited prompts, memory on or off (the memories themselves travel as shared memories) Where memory is stored on this PC
memory-brief The memory brief (memory-brief.json): its text, on or off, whether Martlet or the owner wrote it and the facts it was written from, so every computer sends the same one and none writes it again for facts that didn't change
game-state The game state (game-state.json): for each game its playthroughs and their place, goal, character, build, equipment and progress, and whether saving is on, so every computer knows where you are in your games
user-preferences Your preferences (user-preferences.json): your own rules for how Martlet behaves (such as no hints) and where each applies, so every computer obeys the same ones
lorebooks Every lorebook and the scan settings (up to 16 MiB; larger lorebooks stay on each PC, and sync says so)
character The character shown: a bundled one, one of your characters by its ID (each computer shows its own copy), or a model file at the same path; its renderer, its Audio2Face mapping, show at start The overlay's place and zoom; who does lip-sync (the plan)
character-actions Every model's emotes and motions (character-actions.json): what the Thinking model named them, the owner's tags, voice cues, when to use each and which are on, so a model is named once for all computers
character-touch-zones Every model's touch zones (character-touch-zones.json): the zones vision found or Martlet guessed, and the zones, reactions and words you drew or changed, so the character reacts the same on every computer and each model is found once (up to 8 MiB, the newest models first) The snapshot and the pictures vision saw
character-eyes Every model's eye measurement (character-eyes.json), so a model is measured once with vision for all computers The close-up pictures of the measurement
vroid-hub-looks The VRoid Hub characters used, with their creator, credit and conditions of use (vroid-hub-looks.json)
character-reaction-changes The character's own changes to how it reacts to touches (character-reaction-changes.json; made per personality, so each person's)
check-ins Companion › Check-ins (check-ins.json): the built-in check-ins' choices and your own check-ins (each person's) A check-in's PowerShell script
pool-keys The API keys of the cloud and server members of the Speaking, Listening, Picture making, Vision and Hearing lists (one bundled secret), so a member set up with a key on one computer works on all of them Where each computer keeps the keys (pool-keys.json)
pictures-workflows The custom ComfyUI workflows the Picture making list names (pictures-workflow*.json)
chatterbox-style Chatterbox Original's style (chatterbox-style.json): its exaggeration and CFG weight
recommended-setup The recommended setups you declined and the parts you turned off in its review (recommended-setup.json), so no computer asks again
discord Martlet's Discord setup (discord.json, discord-calls.json): the bot and its token, your own account, the home server, the chat modes, the channel rules, the people Martlet knows, and in your own calls your display name, seeing who speaks, also playing on your usual output, stopping when talked over and the camera framing Whether the bot connects on this PC; in calls, whether Martlet joins them here, what it hears, its output and the camera background
messaging Companion › Messaging (messaging.json): the Telegram bot and the WhatsApp number with their secrets, the paired chats and saying replies aloud Whether Martlet answers each app on this PC; WhatsApp's webhook port and own public address
talk Always listening or push-to-talk, pause length, interrupting, spoken replies, letting Thinking hear you, how chatty Martlet is about what it sees and what the PC plays (Martlet decides included; a computer on an older Martlet reads it as Chatty), how often Martlet reads the text on the screen (Companion › Reading › Read the screen; a computer on an older Martlet leaves each computer's own) Microphone sensitivity, cameras and video addresses, Watch on or off and what it looks at (consent at that screen), echo reduction, hearing what the PC plays
speech-display Whether speech bubbles and subtitles show Where the bubble sits (beside the character or in one place, and its offsets): it depends on this PC's screens
appearance The theme
appearance-custom The colors of the owner's custom palette (Settings › Appearance › Custom; appearance-custom.json). It travels before appearance, so a computer that switches to Custom has them; a computer on an older Martlet keeps its own theme
voice-recognition Whether Martlet recognizes the people it hears (Companion › People)
voice-clips Whether Martlet keeps the last few clips of voices you haven't named (Companion › People; voice-clips.txt). Turning it off anywhere deletes the clips every computer kept The clips themselves (each computer keeps what it heard)
voice-id Voice ID on or off and the owner's voiceprint (numbers only, never audio; Companion › Listening)
smart-home What Martlet may do with Home Assistant: use it when asked, locks, doors and alarms, flexible requests
updates Looking for updates, how often, installing them as soon as they're downloaded, keeping hosts on the newest version
model-abilities What Thinking models hear (recordings) and see (pictures), as Martlet found out: from the server's own model metadata when a model is chosen, tested or checked, from Companion › Listening › Test hearing, or from a model refusing a recording (model-abilities.json). Found out once, on any computer, for all of them; a computer checking its own Ollama later replaces it
work-sharing Devices › Sharing work: which jobs go to another computer when theirs is busy, in what order, which computers never do a job and which are kept for one companion PC (work-sharing.json)
motion The older choice of where Martlet makes body motions for VRM characters (motion.json): automatically on every computer that runs the Motion role, on one chosen computer, or off. The Motion list (the motion area of the pools setting, Companion › Motion) is made from it once and replaces it; a computer not paired with a chosen one keeps the choice and says why it can't make motions there
pc.<device ID> One per computer, written only by that computer: whether it is a companion or a host PC and the host service Martlet runs on it, so every Devices map draws it the same way. Never applied anywhere, not counted as a shared setting, and the first to leave when a copy is full (64 entries), so a computer retired long ago never pushes out a setting
role.<device ID> One per computer: whether it should be a companion or a host PC. That computer records its own choice there, and any other computer writes it to switch it (Switching another computer). Like pc.<device ID>, not counted as a shared setting and among the first to leave when a copy is full
reminders.<device ID> One per computer, written only by that computer: the reminders set on it and what it did about anyone's (offered to say one, took it, said it, canceled it), so any companion PC can list, cancel and say them and the one used most recently says a due one once. Like pc.<device ID>, not counted as a shared setting and among the first to leave when a copy is full
conversation-history Companion › Memory › Conversation history: whether Martlet keeps a record of your conversations and may search it on its own (conversation-history.json)
advanced-settings Settings › What Martlet shows › Show advanced settings (advanced-settings.json): whether every page shows or only the essential ones, so each person sees the same pages on every computer
meaning-search Companion › Memory › Finding by meaning: on or off and which embedding model in Ollama (meaning-search.json). A computer without that model says why and finds by words until it has it The vectors themselves (each computer makes its own) and whether the model is downloaded in this PC's Ollama

Conversations are shared too: each person's record of conversations is the same on every computer where they are signed in, and what Martlet makes from them travels as the shared creations.

One key for each provider. A key the owner saved for a provider in any place (Thinking, Listening, Voice, If Thinking fails, the Thinking pool, or the Vision, Hearing and Picture making lists) is a key for that provider everywhere, because each of these travels with its key. No page then asks for the key again: its key line says where the key is saved, and saving with the key box empty uses a copy of it. The Add a free API key prompt and the recommended setup count it as configured too (SavedProviderKeys).

On a Linux or Mac companion (Martlet for Linux and macOS), pair a host in Settings › Your other computers with the address and code it shows. The companion then takes and shares thinking, listening and speaking (OpenAI or an OpenAI-compatible server, with the API key) and companion (the character's name and persona are the active personality; the others are kept) through the same hosts and the same sync engine, every 15 seconds. It has no accounts yet, so it follows the owner's settings, like an older Martlet. A shared choice that computer can't run (Parakeet, a Windows voice, a model a newer Martlet added) keeps that computer's choice, and Your other computers says why (CompanionGuardrails.Admit). Keys stay in Secret Service or the Keychain, never in its files.

Each person's settings

With accounts, the settings above are split into the household's and each person's. The household keeps thinking, listening, speaking with their API keys, thinking-fallback, thinking-pool, thinking-pool-choices, character-actions, character-touch-zones, character-eyes, vroid-hub-looks, voice-recognition, voice-clips, smart-home, discord, messaging, pool-keys, pictures-workflows, chatterbox-style, recommended-setup, updates, model-abilities, work-sharing, motion, meaning-search, pools and the pc.*, role.* and setup-run.* entries. Each person keeps companion (their personalities and character profiles), replies, prompts, memory, lorebooks, character, talk, speech-display, appearance, appearance-custom, voice-id, touch-temperament, character-reaction-changes, check-ins, memory-brief, game-state, user-preferences, conversation-history, advanced-settings and their own reminders.<device ID> entries. A person's settings go only to the computers where that person is signed in, and switching person on a computer gives Martlet that person's settings. A computer on an older Martlet keeps the owner's settings in step through this document, as before.

What stays with each computer

These describe the computer itself, so they never travel. Each settings file with such parts is in SettingsFiles (src/Martlet.Core/Settings/SettingsFiles.cs) with the reason from its row here; SettingsFilesTests checks that they agree.

Stays here Why
Microphone, speakers, cameras, video addresses, microphone sensitivity, echo reduction, hearing what the PC plays (talk-preferences.json keeps this PC's choices beside the ones that travel as talk) This PC's devices
Watch my screen or a camera (on or off, what it looks at) It captures this PC's screen or camera, so it is chosen at that screen
Where the character and its speech bubble sit, and the character's zoom (character-placement.json, and the bubble's place in speech-display.json); whether clicks pass through the character (character-click-through.json); and the place, eyes and touch choice each character profile keeps here (character-profiles-local.json) This PC's screens
Companion PC or host PC, and the host service on it What this computer is for. Every Windows user of this PC shares it (PC scope, %ProgramData%\Martlet); another of your computers can still switch it
When Martlet starts and closing choices (background.json), Start with Windows How Martlet starts for this Windows user
Paired hosts (hosts.json), SSH keys, Let my other computers find this PC (nearby.txt), Let my other paired computers update Martlet here, Keep Martlet the same on all my computers (cluster-sync.txt) and the port opened on the router (router-port.json) How this computer reaches others, and who may reach it
Where memory is stored A folder on this PC (the memories travel)
The queue of deletions and edits waiting for Telegram and Discord (conversations\platform-changes.json) Only the computer where you made the change asks the app; the record itself travels
Installed engines and models: Ollama models, Parakeet, a whisper package, MCP servers (mcp.json) and their secrets Programs on this PC; a shared route that needs one this PC lacks waits and says why
The terminal Martlet may use while you talk (terminal.json: on or off, shell, start folder, time limit, asking first) It runs commands as you on this PC, so it is allowed at that PC
Context limits Martlet found for local models (model-limits.json) Measured on this PC
Memory local models took in Ollama (model-memory.json) Measured on this PC
The Reading list (pools-local.json) It reads this PC's screen
Which saved key each cloud pool member uses (pool-keys.json; the keys themselves travel as the pool-keys setting) The keys are in this PC's Windows Credential Manager
A check-in's PowerShell script (in check-ins.json; the rest of the check-ins travel as check-ins) It runs commands as you on this PC, so it is allowed at that PC
The paired computers in the Thinking pool and its models in Ollama on this PC (in thinking-pool.json; the cloud members and choices travel as thinking-pool and thinking-pool-choices) Paired computers join each computer's pool by themselves, and models in Ollama on this PC are this PC's own
Which saved key each Singing cloud provider uses (singing-keys.json; the keys themselves travel as the singing-keys setting) The keys are in this PC's Windows Credential Manager
Embedding vectors for finding by meaning (memory's and reports' in memory only; guides' in meaning\guides) Derived data each computer makes from what is shared; never a second copy of a fact, a guide or a report
That this computer made or saw Martlet's starter motions made (motion-starters.json in the account's creations folder) What this computer saw, so it never makes them again after you delete them; the motions themselves are shared creations
The welcome tour's choice of companion or host PC, each Windows user's copy (device-role.txt) What this computer is for
The image and audio models (sense-models.json) Which models a computer can run beside Thinking depends on its hardware
The voice engine Speaking uses here (speaking-engine.txt) It follows the voice engine the speaking host runs now
Singing's older Off choice and the computer this PC last saw singing (singing.json) An older choice, read once into the shared Singing lists, and the computer this PC last saw singing
The household sign-in providers this PC set up, and what it last read of the hosts' providers (household-signin.json) The client secrets are in this PC's Windows Credential Manager; the providers themselves are on the hosts
Whether Martlet's Discord bot connects on this PC, and where this PC keeps its token (discord.json; the rest of the setup travels as discord) Only one computer runs the bot
What Martlet's Discord bot saw and made: friend requests, declines, its call channels and its picture (discord-companion.json) What the bot saw and made on the computer that runs it
In your own Discord calls: whether Martlet joins them through this PC, what it hears, the output it speaks into and the camera background (discord-calls.json; the rest travels as discord) This PC's devices
Whether Martlet answers Telegram and WhatsApp on this PC, where this PC keeps their secrets, and WhatsApp's webhook port and own public address (messaging.json; the rest travels as messaging) Only one program may read a bot's or a number's messages
The colors made from each character model's textures (character-themes.json), and the pictures beside its touch zones and eye measurement (character-touch-zones\, character-eyes\) Derived data each computer makes from what is shared; never a second copy of a fact, a guide or a report
The last clips of voices you haven't named (the voice-clips\ folder; whether they are kept is the shared voice-clips setting) Recordings of what this PC heard; never sent
On a Linux or Mac companion (src/Martlet.Companion): the push-to-talk key, the character file, whether the character shows, lip-sync and the consent to send to a cloud provider (in its settings.json; the rest travels as thinking, listening, speaking and companion) This computer's keyboard and files (F8 is a media key on a Mac), and the consent is given at the computer that sends

Conflicts and offline changes

Each setting is its own last-writer-wins register (Martlet.Core.Sync.SharedSettings) stamped with the same hybrid revision as the plan, max(newest revision known + 1, current Unix milliseconds), the writer's device ID and the time. Merging keeps, per setting, the highest (revision, writer, content), so every copy converges whatever order changes arrive in, and changes to different settings made on different computers are all kept.

  • Changes made here are noticed every 15 seconds by comparing what this PC has with a digest of what it had last time (kept in shared-settings.json), and stamped then. This happens even while sync is off or no host answers, so an edit made offline keeps its time and wins only if nothing newer was changed elsewhere meanwhile. The same setting edited offline on two computers ends as the edit with the later stamp everywhere. The stamps come from each computer's clock, so when one computer's clock runs ahead, its older edit can win; keep the computers' clocks set automatically.
  • Following a newer setting goes through the same rules as Martlet's own pages: a key this PC already has for that provider is used again, a replaced key the owner typed on this PC is set aside and listed under Keys from before on the job's Companion page (never orphaned), and a replaced key this PC only had because another computer shared it is removed (shared-keys.txt lists those). The owner's choice is recorded as made on the computer where it was made. A setting followed from elsewhere is not counted as a change made here.
  • A setting this PC can't use yet (the Parakeet model not downloaded, Ollama without the model, a character file not at the same path, a job a paired host does now, Home Assistant not connected here yet, emotes and motions while the Thinking model names them here) keeps its current value and is tried on every check; Settings for all devices lists it with why, and it is never shared back as this PC's choice. A setting that was applied but reads back differently is tried again after 1 minute, then after longer pauses up to 30 minutes.
  • A failed push is not lost: the change is in this PC's copy and goes to every host whose copy differs on the next check; a host that was off gets it when it answers again, and a restarted host serves its saved copy.
  • The first sync after updating (or on a new computer) has no record of when each setting changed. A value that is still Martlet's default never overrides one; otherwise the evidence of when it last changed here decides: the write time of its API key in Windows Credential Manager, else the file's time. So the PC where you set up OpenRouter most recently wins over a PC that set up NVIDIA Build earlier, whichever syncs first.
  • Use this PC's settings on all my computers stamps everything this PC has as changed now, for when the computers disagree and you want this one.
  • When the plan hands a job back from a host (Setup choice), the shared route is used rather than whatever the PC kept aside.

Where copies live

Copy Location
Each host shared-settings.json beside host.json (0600, gateway service owner), with the API keys
Each desktop shared-settings.json in Martlet's data folder: the merged copy without any key and the digests of what it last saw; keys stay in Windows Credential Manager
Each person, on each host account-settings-<account ID>.json beside host.json (0600): that person's settings, never a key
Each person, on each desktop accounts\<account ID>\shared-settings.json in Martlet's data folder; accounts\working-copy.json names the person whose settings the data folder's files hold

The gateway serves GET /martlet/v1/settings, GET /martlet/v1/settings/digest and POST /martlet/v1/settings (merge and return) to paired devices only, over their pinned, signed connection; API keys for other apps may not use them (gateway contract). Each person's settings are at /martlet/v1/settings/accounts/{account} (the same three forms), for member devices where that person is signed in. Desktops read a host's copy only when its digest changed and give their copy to every host whose digest differs. Secrets are pooled by SHA-256 of the key, and only those a setting still uses are kept. Like the shared Home Assistant token, the keys are readable by every paired device and kept in the host's private file; they are not encrypted end to end between desktops yet.

Qualification

settings_sync_selftest (MCP) runs it end to end on loopback: two real gateways, three simulated desktops with real settings files and the real sync engine and sections, covering the owner's case in both orders, model and key changes, offline edits on both sides, a host that missed a change and restarted, a stale copy, a newer Martlet's setting, a Parakeet model a new computer lacks, a new computer, the fallback and its key, lorebooks, no keys in desktop files and an unsigned request refused. The desktop window's own sync (status, the character, how you talk, speech bubbles and theme; and, on a disposable data folder through -Desktop with --allow-ui-effects, turning on automatic installs and turning off recognizing voices recorded as updates and voice-recognition changes made on this PC) was checked through MCP. Two real computers with real paired hosts, a real Credential Manager across them, the emotes, Voice ID and smart-home sections between real computers, and the Linux host's file are NOT RUN.

Switching another computer between companion and host

You can make any of your other computers a host PC, or a companion PC again, from the computer you are at. Use one of these:

  • Settings › What this PC is for › Your other computers: each computer of your Martlet network with what it is now and a button.
  • The Devices map: select the computer; its row has the same button.

The button reads Make it a host PC on a companion PC and Make it a companion PC on a host PC. It shows for a computer that says what it is (its pc.<device ID>). After a confirmation, this PC writes that computer's role.<device ID> entry and gives it to your hosts at once. That computer follows it on its next settings sync: within 15 seconds while Martlet runs there, or when Martlet starts there next. It waits while Martlet is replying or hearing you there, and switches right after. Until it has switched, its row says who asked and when, and the button becomes Keep it a companion PC, which withdraws the ask.

When it switches, this PC says so once on its status line and in its log, for example IMOUTO is a host PC now, as you asked. A later choice made on that computer (or asked from another one) replaces the ask, and this PC says that too.

The computer that switches does what Use as a Martlet host or Use as my companion PC does there, and Home shows its new dashboard:

It becomes What Martlet does there
A host PC Ends a conversation and hides the character, keeps its companion choices and keeps the PC awake. When it has a host service with roles, Martlet starts Docker Desktop and those roles there by itself and loads their models; it never installs anything.
A companion PC again Shows the character and starts listening and watching as they were when it became a host. When Martlet started as a host since, it does what it does at the start of a companion PC: the character if it shows at startup, and When Martlet starts, show the character and start listening. A host service it runs keeps serving your other computers.

A computer with no host service yet becomes a host PC, but it does no work for your other computers until someone at it chooses Set up host service on its Home once (Windows may ask to allow it). Your other computers say so on its row and in Settings, and the confirmation says so before you ask. To tell these apart, each computer names the host service it runs in its pc.<device ID>: the one it is paired with, the one its host dashboard reads, or, on a host PC while Docker Desktop is stopped, the one Martlet saw set up there before.

Each computer also records its own choice in its role.<device ID>, so the newest choice wins wherever it was made: a computer switched back on itself stays switched back, and an ask from elsewhere made later wins again. The ask travels with the shared settings, so it needs Keep Martlet the same on all my computers on and a host both computers sync with. A computer on a Martlet older than this keeps the entry unread until it is updated (its row keeps saying it was asked), and one that never said what it is offers no switch.

A PC that several Windows users use keeps one choice for all of them (PC scope). A switch asked of any of their devices, or made at the PC by any of them, changes the PC: each Martlet running there follows it within 30 seconds, and the others when they start.

Checked locally: the merge rules with a unit test, the map's rows, the Settings lines and the button with unit tests, and end to end through MCP with role_lab (MCP) on a disposable data folder. The lab ran a real gateway on loopback, paired with the real desktop, and a simulated companion PC that joined the desktop's network. The desktop made it a host PC from the map and a companion PC again from Settings, and said so each time. The simulated PC then made the desktop a host PC (the character hid) and a companion PC again (the character showed again). Two real computers switching each other through a real host are NOT RUN.

The shared memories

What Martlet remembers travels in its own document, one last-writer-wins entry per fact (forgotten facts leave tombstones): each host keeps memories.json beside host.json (0600, gateway service owner) and serves GET /martlet/v1/memories, GET /martlet/v1/memories/digest and POST /martlet/v1/memories (merge and return) to paired devices only. Desktops sync every 30 seconds while memory is on and Martlet is the same on all your computers. See MEMORY.

The shared voice list

The voices Martlet recognizes (Companion › People) travel the same way, in their own document: each host keeps voices.json beside cluster.json and serves GET/POST /martlet/v1/voices; desktops merge every 30 seconds with every paired host of their own. People are always shared in the household (ACCOUNTS), so this runs even while Keep Martlet the same on all my computers is off; hosts a friend shares never take part. Whether Martlet recognizes voices at all is the voice-recognition shared setting, which follows the switch. Each voice is a last-writer-wins entry with the same hybrid revisions; forgotten and merged voices leave tombstones. See VOICES.

The shared speaking voices

The voices Martlet speaks with (Companion › Voice › Voices) and their recordings are on every node, so a reply never waits for a recording to travel and any of your PCs can be the companion with the same voices. There are no built-in voices: a new list starts with Martlet's starter voices, which are removed like any other (F5 voice).

  • The list (Martlet.Core.Voices.SpeakingVoiceLibrary): one last-writer-wins entry per voice, keyed by its reference revision (SHA-256 of the recording's SHA-256 and the transcript's), with its name, transcript, recording SHA-256 and length, why it may be used and when it joined; and one entry for the voice chosen on all computers. Same hybrid revisions and merge rules as the plan; removed voices leave tombstones. Starter entries are revision 1, so a removal anywhere wins everywhere. A recording Martlet no longer ships (the former "anime" starter voices) is removed the same way by the first updated desktop. JSON, snake case, schema 1, at most 4,000 tombstones and about 54 MiB (room for 1,000 voices at their most). Adding a voice is refused while 1,000 are live, and a merge keeps every live voice.
  • A voice made from several recordings (2 to 10, each at least 0.5 s) is still one recording on the wire: the desktop joins them, in order, after a 0.5 s pause each, at the highest sample rate among them (others resampled), and their transcripts with spaces; together at most 30 s and 4 MB. Its entry adds clips (each recording's transcript, start_sample and sample_count in the joined recording) and the joined sample_rate, so the recording, its sharing and its SHA-256 work like any other voice's. A Martlet older than this can't read a list holding such a voice (unknown fields are refused) until it updates.
  • Each host keeps speaking-voices.json and one speaking-voice-<sha256>.wav per live voice beside host.json (0600, gateway service owner; not part of the approved configuration). A recording no live voice uses is deleted.
  • Each desktop keeps speaking-voices.json in its data folder and its copy of every recording in its F5 voice store (f5-voices).
Endpoint (paired devices only, over the pinned, signed connection; API keys may not) What
GET /martlet/v1/speaking-voices The host's list and the SHA-256 of each recording it holds (present)
POST /martlet/v1/speaking-voices Merge a desktop's list in; returns the merged list and present
GET /martlet/v1/speaking-voices/audio/<sha256> One recording (reference.missing when the host has none)
POST /martlet/v1/speaking-voices/audio/<sha256> Send {"audio_base64": ...} for a live voice; refused (request.invalid) for a wrong SHA-256, a recording no live voice has, or anything but a mono 16-bit PCM WAV of 1 to 30 seconds

Every 30 seconds while any host is paired and Martlet is the same on all your computers (and two seconds after you add, use or remove a voice) the desktop reads every paired host's list, merges them into its own, copies each recording it lacks from a host that has it (starter recordings come from Martlet itself), deletes removed voices' copies (not the one it still speaks with), gives every host whose list differs the merged list and sends each host every recording it lacks. Then it follows the voice chosen on another computer once its recording is here and the speaking engine can use it (an open conversation reloads when idle). Voices > F5VoicesShared says with how many computers the voices are shared. Nothing is written while no host is paired or while the switch is off.

A speaking request names its recording by SHA-256 (reference_audio_base64 is optional); the host's gateway hands its engine the copy it keeps. A host that lacks it answers reference.missing and the desktop sends the request again with the recording, which the host then keeps when a live voice uses it. A host older than shared speaking voices refuses the request with request.invalid; the desktop then sends the recording with every request to that host, as before, and the status asks you to update it.

For a voice made from several recordings, the host's gateway looks the voice up in its own copy of the list. An engine that learns from several recordings (SpeechEngine.MultipleReferences: XTTS-v2 and GPT-SoVITS) gets the joined recording plus reference.clips (where each lies and its words) when at least one recording fits its length bounds, and its service cuts them apart: XTTS-v2 computes its speaker from every recording, and GPT-SoVITS prompts with the first 3-10 second recording and adds the others' tone (aux_ref_audio_paths). Every other engine (Chatterbox Turbo, F5-TTS, Dia), or a host whose list lacks the voice, clones the joined recording, so a voice usable as one recording is always usable. The engine's length check takes either: GPT-SoVITS can speak a 14-second voice through one of its 3-10 second recordings.

Checked locally with speaking_voices_selftest (MCP): two real gateways and two simulated desktops with real voice stores on loopback, including a voice of three recordings shared between them and handed to the XTTS-v2 relay as three recordings and to F5-TTS joined. The desktop's sync window with real paired hosts, the Linux files, real voice engines and two real computers are NOT RUN.

The shared character models

The character models the owner adds (Companion › Character › Your characters, or a model file shown or saved in the character settings window) are copied to every Martlet computer that can be the companion: each Martlet desktop, whether it is a companion or a host PC right now (a host PC can become the companion in one click and then already has them). Desktops reach each other only through paired hosts, so each host keeps a copy too, only to pass it on; a host never shows a character. Which character is shown travels with the shared settings (character), naming one of these models by its ID, so every computer shows its own copy of the same character (a computer still copying it keeps its current one until the copy is complete). The built-in character is part of Martlet and never in the list.

  • The list (Martlet.Core.Characters.CharacterModelLibrary): one last-writer-wins entry per model, keyed by its ID (SHA-256 of its renderer, model file and every file's path, SHA-256 and length, so the same model is the same entry everywhere), with its name, renderer (live2d or vrm), model file, files, the computer it was added on and when. Each file lists the SHA-256 of every 3 MiB piece: a file travels piece by piece, each piece in one signed request within the gateway's request limit, and an interrupted copy continues where it stopped. Same hybrid revisions and merge rules as the plan; removed models leave tombstones. JSON, snake case, schema 1, at most 128 MiB (every computer reads the whole list into memory) and the newest 4,000 tombstones. Adding a character is refused with a clear message when the list already has 1,000 characters or when all characters would pass 16 GB together. A merge of several computers' lists keeps every character, even past those numbers; no character ever leaves the list unless it is removed. Each model follows the renderer's rules: a VRM is one .vrm of at most 512 MB; a Live2D model is its .model3.json and the files it declares, .json, .moc3, .png and .wav only (128 files, 128 folders, 512 MB per file, 1 MB per JSON, 1 GB in all), never scripts; other files beside it (VTube Studio settings, readmes) are not copied.
  • Each host keeps character-models.json and one character-model-chunk-<sha256>.bin per piece of a live model beside host.json (0600, gateway service owner; not part of the approved configuration). Pieces live on disk, not in memory (a host that can't save a piece keeps at most 512 MB of pieces in memory); a piece no live model uses is deleted.
  • Each desktop keeps character-models.json in its data folder and each model's files in character-models\<first 16 hex digits of its ID>, laid out like the original folder, so the renderer shows the copy exactly like the original (the original can be moved or deleted afterwards). Pieces arriving from another computer wait in character-models-incoming until the model is complete and every file's SHA-256 checks; then it moves into place in one step.
Endpoint (paired devices only, over the pinned, signed connection; API keys may not) What
GET /martlet/v1/character-models The host's list and the SHA-256 of each piece it holds (present)
POST /martlet/v1/character-models Merge a desktop's list in; returns the merged list and present
GET /martlet/v1/character-models/chunks/<sha256> One piece (chunk.missing when the host has none)
POST /martlet/v1/character-models/chunks/<sha256> Send {"data_base64": ...} for a live model; refused (request.invalid) for a wrong SHA-256 or a piece no live model has

Every 30 seconds while any host is paired and Martlet is the same on all your computers (and two seconds after you add, use or remove a character) the desktop reads every paired host's list, merges them into its own, copies the pieces of each model it lacks from hosts that have them, assembles and checks the model, deletes removed models' copies (not the one it shows, until another character is chosen there), gives every host whose list differs the merged list and sends each host every piece it lacks. A model file this PC showed before characters were shared joins the list on the first sync, and the PC then shows Martlet's copy (the same files). Companion › Character's CharacterModelsShared says with how many computers the characters are shared. Nothing is written while no host is paired or while the switch is off. A host older than shared characters refuses with request.invalid; the status asks you to update it. Each model's emotes and motions travel with the shared settings (character-actions), keyed by the same model ID.

Checked locally with character_models_selftest (MCP): two real gateways and three simulated desktops on loopback with generated Live2D and VRM fixtures, and the desktop UI (adding, showing, switching and removing a real Live2D model's copy on a disposable data folder). The Linux host's file custody was checked on the fake Linux file system. The desktop's sync with real paired hosts, a real Linux host's files, rendering a copy on another computer and two real computers are NOT RUN.

The shared creations

Everything Martlet makes (songs, reports, pictures and a VRM character's kept body motions) is a creation, kept the same on every Martlet computer the way the character models are: one last-writer-wins entry per creation with tombstones (Martlet.Core.Creations.CreationLibrary, the same hybrid revisions and merge rules), and assets stored once by SHA-256 that travel in 3 MiB pieces, each in one signed request. Every desktop, companion or host PC, keeps every creation, so Martlet on any computer can perform any of them; each host keeps creations.json and creation-chunk-<sha256>.bin beside host.json (0600, gateway service owner) only to pass them on, so a desktop that was off catches up from any host.

Endpoint (paired devices only, over the pinned, signed connection; API keys may not) What
GET /martlet/v1/creations The host's list and the pieces it holds (present)
GET /martlet/v1/creations/digest Digests of the list and of present, so unchanged hosts aren't read
POST /martlet/v1/creations Merge a desktop's list in; returns the merged list and present
GET /martlet/v1/creations/chunks/<sha256> One piece (chunk.missing when the host has none)
POST /martlet/v1/creations/chunks/<sha256> Send a piece of a live creation; refused (request.invalid) for a wrong SHA-256 or length, or a piece no live creation has
/martlet/v1/creations/accounts/<32 hex> (with /digest and /chunks/<sha256>) The same for one account's own list, for paired member devices that may use that account (creations.account_denied otherwise); at most 64 account lists (creations.accounts_full)

Each account has its own creations: a host keeps one list per account (creations-account-<32 hex>.json), the old single list for desktops on an older Martlet, and one pool of pieces for all of them, deleting a piece only when no list's live creation uses it. A desktop syncs the signed-in account's list from its folder accounts\<32 hex>\; the owner's desktop also joins the old list both ways, so older desktops keep the owner's creations (each account's own creations).

Desktops sync every 30 seconds while any host is paired and Martlet is the same on all your computers (and two seconds after a change), with the same engine MCP's creations_check rehearses on loopback, two accounts included. The desktop's sync with real paired hosts, the Linux host's files and two real computers are NOT RUN.

The shared Home Assistant connection

Home Assistant is one connection for the whole app. Each host keeps one home-assistant.json beside cluster.json/voices.json; any paired desktop can read it and replace it via GET/POST /martlet/v1/home-assistant, newest revision wins. While Martlet is the same on all your computers:

  • connecting Home Assistant on any computer (setup, sign-in or a pasted token) gives every host that connection at once, and every other computer takes it within a minute, replacing whatever it used before;
  • a computer connected before connections were shared, while no host answered or while the switch was off, gives its connection to the hosts when they keep none or an older one;
  • Disconnect writes a tombstone (a null address and token, keeping the latest revision): the hosts forget the token and every computer disconnects;
  • what Martlet may do with it (use it when asked; locks, doors and alarms; flexible requests) is the smart-home shared setting.

With the switch off, a connection stays on the computer where it was made. The document contains a secret, the Home Assistant token: Linux hosts keep it as a 0600 service-owner file and the gateway sends it only to paired devices over the pinned, signed connection. See SMART_HOME.

Commands between your computers

Any paired computer can ask a host to update, install or remove a role or show its status, without SSH and without anyone typing a command on that computer. The host's gateway is a mailbox; the Martlet app on the host computer (a PC set up with Use as a Martlet host) is its agent and runs the commands there. On the Devices map such a host is reached Through Martlet on that computer (paired connection), which replaced the old I run its commands on it myself; hosts saved that way are moved over automatically. Linux computers without Martlet keep using SSH.

sequenceDiagram
    participant Main as Main PC (Martlet)
    participant GW as Host's gateway (mailbox)
    participant Agent as Martlet on the host PC
    Main->>GW: POST /martlet/v1/commands (signed, pinned TLS)
    loop every 5 s
        Agent->>GW: POST /commands/agent (agent token)
    end
    GW-->>Agent: every command that may start now (and its secrets, once)
    Agent->>Agent: runs them side by side (martlet-host / the update)
    Agent->>GW: POST /commands/{id}/report (output, outcome)
    Main->>GW: GET /commands/{id} (follows output in a run window)
Loading
Endpoint (all over the paired, pinned, signed connection) Who What
GET /martlet/v1/commands any paired device the agent (device, last seen, Martlet version, kinds it runs, whether it runs commands side by side) and recent commands
POST /martlet/v1/commands any paired device send a command; the same one while it waits or runs returns that one
GET /martlet/v1/commands/{id} any paired device one command with the last 120 lines of its output
POST /martlet/v1/commands/{id}/cancel any paired device withdraw a waiting command, or ask the agent to stop a running one
POST /martlet/v1/commands/agent the agent (token) take the next command that may start beside the ones it lists as running, or resume one it took before restarting (an agent that sends no running list gets one at a time)
POST /martlet/v1/commands/{id}/report the agent (token) add output and, at the end, the outcome

Commands (Martlet.Core.Nodes, checked on both ends; anything else is refused with request.invalid):

Kind Arguments What the agent does
martlet.update version Updates Martlet itself to at least that version from its GitHub Release (checked against GitHub's SHA-256 digest, installed as soon as no reply or other work there would be cut short, with no installer window at all, then restarts by itself, minimized, with the character, listening and watching as they were, and continues; each step is in that PC's log), then the host service to Martlet's version
host.status none martlet-host status
host.describe-role role martlet-host describe <role> (its terms, secrets and choices, for the sender's install dialog)
host.add-role role, choice.<VAR>; secrets secret.<name> martlet-host add <role> with the answers on stdin
host.remove-role role martlet-host remove <role>
host.exposure outside (up to four canonical name:port addresses, comma-separated; empty removes them), pairing_codes_outside and treat_all_as_outside (yes or no) martlet-host exposure with exactly those options (Outside access); its gateway restarts

Security:

  • Sending needs a paired device's signed request (HMAC with nonce and clock window, pinned TLS); anonymous and replayed requests are refused.
  • Only the agent can take or report commands: at each start the gateway writes a fresh random token to agent.token beside host.json (0600, service owner), which only the host computer itself can read (Martlet reads it with docker exec martlet-host-gateway cat ...). The previous start's token stops working. A paired computer elsewhere never sees it.
  • Secrets (for example an NGC API key) stay in the gateway's memory until the agent takes the command, are handed over once and never appear in command lists, output or commands.json. A waiting command's secrets are dropped after 15 minutes; a gateway restart fails a waiting command that had them.
  • The gateway runs nothing. The agent runs only the kinds above, through the same martlet-host engine as every other route; updates come only from official releases. The owner can turn it off on the host PC: Settings › Your other computers › Let my other paired computers update Martlet here and manage this PC's host service (on by default; node-commands.txt holds off). Commands then wait.
  • Bounds: 8 waiting or running commands, 24 kept, 120 output lines of at most 1,000 characters each; waiting commands expire after a day, running ones that stop reporting after two hours. commands.json keeps state and the last 20 output lines, so commands survive a gateway restart (including the gateway's own update) and the agent finishes them afterwards.

Martlet on a PC that runs a host service keeps it on its own Martlet version by itself, whatever Keep my Martlet hosts on this PC's version says. After Martlet installs its own update it comes back first (its window is usable at once) and then, in the background, builds the new martlet-host image and runs update (with --yes, as keeping this PC's host service current always has: the configuration it approves comes from the release this PC just installed; exit 75 busy: tried again three minutes later; it waits while Martlet replies or hears you, for this PC's own pending update, and for another route already updating it). It checks again every minute until the host service runs this version, for example once Docker Desktop starts; Settings › App updates says where that stands. So a host service from before commands existed (for example 0.14.1) is updated by itself the next time Martlet runs on that PC; from then on the main PC updates and manages it from here. With Keep my Martlet hosts on this PC's version on, the main PC sends martlet.update to such hosts in the background; it runs as soon as Martlet runs there.

When updates and other work meet

Updates arrive from several directions (Martlet installing its own update, another computer's martlet.update, automatic host updates from any desktop) while a host may be busy installing a role, pairing or serving its console. Nothing is interrupted and nothing is lost:

  • On the host, changes side by side. Every route ends in the same martlet-host engine, whose kernel locks let changes to different roles run at once and make only what truly collides wait (Changes side by side): a second change to the same role (or to another engine of its exclusive group, such as the voice engines), a setup or update, which runs alone, and the moment a change restarts the gateway to publish its role. A change asked for by someone (a run window, a command from another computer) that collides waits and its output says what it waits for. An automatic background update doesn't queue: it stops at once without changing anything (exit 75, MARTLET-BUSY ...).
  • Automatic host updates try again. A host found busy keeps its update pending, not failed: its Devices card says what the host is busy with, and Martlet tries it again every three minutes until it is free (this PC's own host service likewise). A host whose gateway doesn't answer while it restarts for another computer's update is asked again the same way. Update hosts now waits its turn instead (up to 30 minutes) and then updates.
  • Martlet never races itself. Every route that updates a host from one Martlet (an Update host run window, a command from another computer, keeping this PC's own host service current, the automatic pass) claims that host first. The automatic pass leaves a claimed host to that run instead of starting a second update that would find the host locked by Martlet's own update and call it busy, and this PC's own host service is updated once per pass, not once as its pairing and again as "this PC". When a host is updated by any route, or a pass or check finds it current (Check connection, the release it announces, or this PC reading its own host service), its retry goes and an earlier "waiting to update" note on its Devices card becomes Updated to Martlet ....
  • Commands side by side on a host PC. Its Martlet takes every command that may start now and runs each in the background, so several computers (or one computer several times) can install different roles on it at once (NodeCommandSchedule in Martlet.Core.Nodes). Only a true collision waits: adding or removing a role waits for an earlier change to that same role (Martlet on gpu-pc is already changing singing: Install singing (from desktop-a). This runs right after it; everything else runs side by side.), and an update runs alone: it waits for the commands already running, and the commands sent after it wait for it, including while it waits until nothing needs Martlet there and while Martlet restarts into it (Martlet on gpu-pc is updating first: Update to Martlet 0.22.0 (from desktop-a). This runs right after it.). Changes that collide only on the host itself (two voice engines, the gateway's restart) wait inside the engine and say so in their output. Sending (and the first look at the host) keeps trying for up to five minutes while that host's gateway restarts. A host PC with an older Martlet (no running list) still runs one command at a time, oldest first, and an older gateway hands a newer Martlet one at a time; the sender's explanation follows what the agent does (parallel in the agent info).
  • Martlet installs its own update only when nothing needs it. Besides you, the character and a conversation, that means no setup task, no host service update, no command from another computer running and no update check or download under way. Settings › App updates says what the downloaded update waits for; a martlet.update from another computer tells that computer the same. An update that computer asked for joins an update check or download already under way instead of failing, and Martlet there doesn't also ask whether to install it: it installs with no installer window and restarts by itself, minimized (or in the notification area). While Martlet exits to install, it takes no new command; commands sent meanwhile wait in the mailbox.
  • Every computer hears of an update. A host announces the Martlet release it runs on every network sync (NETWORK), so once Martlet on a host PC has updated itself and its host service (or any computer updated a host), all your other computers show the new release within 20 seconds and stop offering or retrying an update it no longer needs.

Checked locally: node_link_check (MCP) runs the protocol end to end on loopback with the real gateway, desktop client and agent loop, including three commands running side by side, a second change to one role waiting for the first, an update that waits for what runs and holds what was sent after it, and an older agent still getting one at a time; host_engine_check (MCP) runs the real martlet-host engine's locks in a disposable container (adds of different roles side by side, the same role or exclusive group waiting, setup and update running alone); host_update_check (MCP) rehearses how one Martlet keeps its own host updates from colliding with its production update tracker, and how this PC's own host service follows the app's version after an update; app_update_check (MCP) runs the desktop's real update helper with stand-ins for Martlet and the installer (it waits for Martlet to exit, runs the installer with no window, or switches to a version already installed beside Martlet, logs each step and restarts Martlet minimized). The same client and agent ran against a real Linux gateway container built from this source (token read with docker exec, commands.json without secrets, a new token after restart). The desktop's own runner on a real host PC (installing an update, martlet-host runs, real installs side by side), the engine locks on a real Docker-method host, an older gateway refusing the running list, and two real computers are NOT RUN.

Applying the recommended setup

Home's recommended setup suggests one setup for all your computers. After you review it and click Reconfigure, Martlet applies it to every computer (SetupExecutor in Martlet.Core.Planning; the desktop's paths are in MainWindow.RecommendedSetupApply.cs).

Before Reconfigure, the review shows the preflight (PrepareRecommendedSetupAsync). For each role that Martlet installs or changes, Martlet reads the role from that computer (martlet-host describe, the same reading as the install dialogs: host.describe-role through Martlet on that computer, this PC's own host engine, or SSH). The preflight shows:

  • the terms and licenses of each role (its own and those of the variant it uses, for example Parakeet's or Whisper's),
  • each secret that a role needs and that the host does not store yet (for example an NGC API key; the change then needs you),
  • about how much each change downloads (nothing for a model that the host kept from a role it turned off before: its machine report lists it in downloads),
  • the changes that need someone at that computer, and the changes that Martlet cannot make, each with the reason.

The Reconfigure click accepts the terms that the review showed. Martlet logs that acceptance for each install. A change that the review did not show is never made. A secret that you enter in the review stays in memory and goes only to the host that needs it.

Then Martlet makes the changes in the order of the recommendation (make before break: move or change roles, add roles, hand over jobs, share work, then remove roles). It uses only the paths that already exist:

Change Path
Add a role, change its model, move it to a graphics card host.add-role with choice.<VAR> answers through Martlet on that computer; this PC's own host engine; or the SSH runner without questions, as automatic host updates use it. The model selects its choice and its variant (choice.STT_ENGINE=parakeet for a Parakeet model). A choice that selects a variant is always sent, with its default when the change names none, so the host installs the variant whose terms the review showed. An installed role keeps what it runs with now. choice.gpu is the UUID of the card from the describe output, found by the card's exact name (then a name that contains the other, then its place among the NVIDIA cards).
Remove (turn off) a role host.remove-role, or martlet-host remove on this PC or over SSH. It stops the role and takes it out of the gateway. Its images, volumes and models stay, so adding it again downloads nothing.
Hand a job to a computer The shared cluster plan, as Use for ... on the Devices map does, with failover on. Without a host, each companion PC uses its own choice again.
Hand a job to no host The way of doing it that the recommendation names (JobPlan.OptionId). Martlet switches this PC with the Companion page's own path when it can: a model in this PC's Ollama (Use Ollama on this PC), Parakeet or loudness lip-sync. That path also records in the shared plan that no host does the job, and your other companion PCs follow the shared route when they can. A hosted provider is switched only when this PC already uses it; otherwise the review says where you choose it (for example Choose OpenAI for thinking in Companion › Thinking), and Martlet never reports that change as made.
Share speaking or listening Devices › Sharing work (work-sharing.json, the work-sharing shared setting): the computer is no longer in the job's never list, and sharing is on. Leaving puts it on that list.
Join or leave the Thinking pool Nothing to do. A computer joins the Thinking pool by itself on its next check when it runs the deep-thinking role. Martlet never writes thinking-pool.json for this.

While the run works, Martlet does not install its own update, and closing Martlet asks first. If Martlet closes before the run ends, the next start ends the run record: the changes not made need you.

The run is a background task: Reconfigure closes the review and opens the run's window, Reconfigure your computers. It lists the changes, then each computer's steps and what its host engine prints, and ends with each change's outcome. Hide keeps it going in Background tasks. Cancel task... (or Background tasks' Cancel...) stops the changes not made yet; each says so, and the task shows that it was canceled. While it runs, a second Reconfigure says so instead of starting again.

A role is never removed while the job it does cannot move off its computer: when the change that hands the job to another computer needs you or fails, the removal waits too, and the review and the outcome say so.

A failed step does not stop the other steps. Each step keeps your other choices: a job that moves to a host keeps the previous route aside, as a manual handoff does. After the last step, Martlet checks every host once (Check hosts), so this PC and every companion PC follow the new plan within one check. A job that this PC cannot follow yet (for example, no voice is selected for that engine) is reported as a change that needs you.

Configuring

While Martlet changes a computer, every computer shows that computer as Configuring:

  • The run record. The computer that applies a recommended setup publishes a SetupRun (Martlet.Core.Cluster) as its own shared settings entry, setup-run.<device ID>. The record holds the run ID, the device that started it and when, and one entry for each computer: Pending, Configuring, Done, Failed or NeedsAttention, with the current step in words ("Installing Chatterbox Turbo (2 of 4)"). It also holds the time the run finished. Only that computer writes its entry. Like the pc. and role. entries, it is not counted as a shared setting, and it leaves first when a copy is full. Every computer reads it on its next settings sync (every 15 seconds). A run that has not changed for two hours is no longer shown as active. A finished run stays on Home for ten minutes.
  • Host role changes. A host shows Configuring while this PC installs, changes or removes a role on it, or updates it through Martlet on that computer. A host PC shows Configuring while it runs such a command from another computer.
  • Following a plan change. A companion PC shows Configuring for a short time while it switches a job to follow the shared plan.

Where it shows:

  • Home. On a companion PC, the hero shows Configuring your computers beside the listening indicator (HomeConfiguring, with its text in HomeConfiguringStatus). On a host PC, it shows under the host buttons (HostConfiguring, HostConfiguringStatus). A click opens the Devices map.
  • The Devices map. The computer shows the status Configuring: over its other statuses (NodeHealth.Configuring).
  • The tray. The tooltip adds a line, for example Configuring 2 computers.

This work runs on the settings sync, the node agent and the host runs. Nothing of it is on the reply path.

Checked locally: setup_run_check (MCP) runs the production executor on a fixture recommendation against simulated computers: the preflight, the host commands and their arguments, the secret, the plan with failover, Sharing work, a failed step, a change missing from the review, and the run record as another computer reads it. setup_run_status (MCP) reads the published runs, the plan and Sharing work from a data directory. The desktop showed a run from another computer on Home and on the Devices map (MCP -Desktop, disposable data directory). Real installs on real hosts, SSH hosts and two real computers are NOT RUN.

Martlet documentation

Clone this wiki locally