The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.
Harness Pro: the round dial's Swarm chat, PM and Buddy
Status: spec · 2026-10-30 · requester: Diego · base: origin/main 5754fc4b7
Mockup: devices/harness-pro/mockup/pro-swarm-parity/index.html (main checkout, gitignored), screens 1A–3D, header A chosen.
Builds on: 2026-10-28-round-dial-swarm-chat-design.md (the chat on a project's face) and
2026-10-29-round-dial-pm-buddy-spec.md (the PM and the Buddy). Wire reference: devices/harness-pro/docs/cable.md.
Why
Since 2026-10-28 the round dial has shown the chat the desktop has open in each Swarm project. It alerts on that chat's new messages, and since 2026-10-29 it has had a Buddy screen per project. The Harness Pro has none of this:
- Its hello (
pro_cable.c:220-240) saysswarmCard v1andsuperTab wait-v1, but notswarmChatorswarmBuddy. The daemon therefore sends it the older frames: the Lead's last message only, and no notices. - It ignores
supertab.focuswith an empty Lead (handle_supertab_focus,pro_cable.c:656,id_fitsneeds a non-empty id). The daemon sends that frame when the desktop opens a Swarm tab with no project open, such as its Chat with PM or a DM (cableSession.tspushSwarmFocus). So a Pro does not follow the desktop into that Swarm. - A tap on a Lead that runs on another machine does nothing (
pod_glue.ctalk_target: "empty for a remote Lead: no talk"). The round posts those words into the Lead's chat by its Swarm id (swarm.remote, #2232).
Decisions (Diego, 2026-10-29/30)
- Scope: the round's Swarm work, all of it. That is the face chat, alerts, PM | Buddy, voice to a remote Lead or a Buddy, and the empty-Lead focus. Nothing that the round does not do. No new device features.
- Approach A: the Pro speaks the round's protocol. Its hello adds
swarmChat: "v1"andswarmBuddy: "v1", and it honours the same frames. The daemon gets no new frames. Its one change is a token budget for the Pro (§ Daemon). - Three phases, one PR each, mockup first (this spec covers all three):
- the face chat, notices and the empty-Lead focus;
- PM | Buddy;
- voice.
- PM | Buddy is two buttons at the top of the Lead view, not a vertical swipe. A vertical drag on the Pro already scrolls the message.
- Header A (mockup 2A): with Buddies on, the pill takes the top band. The Swarm and project names share one line, and the bubble keeps its 7 rows at y 150.
- A group chat's name is shown as its title alone, with no "#".
- A Buddy that is down shows "offline" under its name (mockup 3B).
Behaviour
Phase 1: the chat the desktop has open
- Face chat. The Lead view shows the chat the daemon names for the Lead (
chat,chatId,chatNameinsupertab). The daemon decides it, as for the round: the conversation the desktop has open in this project, else the Lead conversation. - Chat name (mockup 1B, 1C). When
chatis notlead,chatNameis drawn under the project:ph_sb_22,PH_ROOM_MUTED, centred at cy 120, cut with "…" at 640 px.- The bubble does not move. When
chatislead, the view is exactly today's (1A).
- Who row. It stays the Lead's: pet, "Lead" and the status line.
- For a
swarmChatdevice the daemon sendsstate: workonly for a working group, and neveraskorstuck(chatLead). - The bubble's ask/stuck edge therefore no longer appears for these Leads, as on the round.
- For a
- Recap.
supertab.recapcarrieschatId. A recap whosechatIdis not the Lead's currentchat_idis dropped.- After a chat switch, the bubble shows "…" until the new chat's recap arrives. This is the race the round fixed in #2232.
- Notices (mockup 1D, 1E).
supertab.notice {tab, lead, chat, chatId, id, text, at}:- Toast: the
ph_toastcard. The name is the project, followed by "· " in the Super Tab tag style (ph_sb_22,#8EA3BD). The line is the text's first sentence, and the timer runs as for an agent's notice. - Notices row: one per Lead, keyed by (tab, lead), with the newest replacing the older one.
- It uses the inbox bubble. The name line is " · " (tag in
#6B4FA3), with the age at the right. - The avatar is the Lead's pet.
- It has no ask edge and no diamond badge, because those mark a Super Tab question.
- Order: after the asking agents, merged with the agent entries newest first.
- It uses the inbox bubble. The name line is " · " (tag in
- Tap on the toast or the row: open that Lead's view (
pod_nav_follow_lead) and sendsupertab.select, as a tap on a Swarm card's pet does. supertab.notice.read {tab, lead, chatId}: remove the row whosechatIdmatches, and end its toast if it is up.- Sound: a notice uses the beep and wake of an agent's alert notice. A Pro that is muted stays silent.
- Toast: the
- Empty-Lead focus.
supertab.focus {tab, lead: ""}opens that Swarm's Lead view:- on the Lead it last showed in that Swarm (kept in RAM per Swarm id, lost on reboot);
- else on its first Lead.
- A Swarm not in the list yet waits
POD_FOLLOW_PENDING_MS, as a named Lead does today. - The quiet-window and talking rules of
apply_lead_focusapply unchanged.
Phase 2: PM | Buddy
- The pill (mockup 2A). It is shown only when the Lead carries
buddies: true.- Geometry: 300 × 44 at (210, 16), radius 22, track
#34302C. It has two 150 px segments, "PM" and "Buddy" (ph_sb_22). - The selected segment is filled: PM in
PH_ROOM_INKwith dark text, Buddy in lilac#C49BFFwith dark text. The Swarm purple#B79CFFis too close to lilac to mark PM. - With the pill, the header is one line centred at cy 94: the Swarm name in Swarm purple (
ph_sb_26), " · " muted, then the project (ph_sb_34). Cut with "…" at 640 px, the project's end last. - The chat name, when shown, moves to cy 130. The bubble stays at y 150, 7 rows.
- With Buddies off the view is exactly phase 1's.
- Geometry: 300 × 44 at (210, 16), radius 22, track
- Switching.
- A tap on a segment sends
supertab.side {tab, side: "pm" | "buddy"}. The view changes when the daemon's nextsupertabframe says so (side, and the face chat it carries). - The pressed segment shows pressed at once, so the tap is seen.
- The newest of the dial and the desktop wins. That is the daemon's rule (
cards.tsside(), cleared when the desktop's open chat changes). - The side is per Swarm and kept across a horizontal swipe to another Lead.
- The pill is a hit, so
talk_targetskips it as it skipsPOD_A_BACK.
- A tap on a segment sends
- Buddy screen (mockup 3A–3C). It shows when the face chat is
chat: "buddy".- Avatar. The Buddy's avatar replaces the pet:
- the desktop pattern (
desktop/lib/super_tabs/avatar_art.dart), frombuddy.cells(15-bit half, mirrored[0,1,2,1,0]over 5 rows) andbuddy.color; - a disc of 120 px centred in the pet's 150 px box, the pattern at 56 % with cells rounded at 20 %;
- no engine badge.
- It is a port of the round's drawing (
supertab.c/ui_habitat.c) toht_proprimitives.
- the desktop pattern (
- Name. In place of "Lead", the Buddy's
namein lilac (ph_sb_34). - Status. Under the name, "offline" in
PH_ROOM_MUTEDwhileliveis false, else nothing. - Bubble. The Buddy's last message in that chat (the recap).
- No Buddy (
buddies: true, nobuddy):- no bubble and no who row;
- a dashed 120 px circle with "+" centred at x 360;
- "No Buddy here yet" (
ph_sb_34, muted) and "Add one in the Harness app." (ph_rg_28, muted) under it. - The Pro cannot add a Buddy.
- Avatar. The Buddy's avatar replaces the pet:
- The Buddy's quiet notice (mockup 3D). A
supertab.noticewithchat: "buddy"raises:- no toast, no Notices row and no beep;
- a 12 px lilac dot at the Buddy segment's top right, while the PM side is shown.
- Opening the Buddy side clears the dot. The daemon reads the notice when the Buddy chat becomes the open chat and
sends
supertab.notice.read. The Pro also clears the dot locally on the tap, so it never lingers on a lost frame.
Phase 3: voice
- Tap target. Tapping the Lead view starts listening, as today, with these targets:
- PM side, local Lead: its harness id, as today. The daemon posts into the face chat (
swarmSay). - PM side, remote Lead: the Lead's Swarm id. This is sent only when the daemon's welcome lists
swarm.remote(newCABLE_FEATURE_SWARM_REMOTEin the Pro'scable_features). An older daemon gets no target, as today. - Buddy side: the same id as on the PM side. The device names no chat. The daemon finds the Lead by that id
and posts into the face of the side it holds for the Swarm (
swarmFaceOf:lead.sideChat ?? lead.chatfor aswarmBuddysession), which is the Buddy chat, as the person.- A Buddy post that fails is a voice error ("Could not reach your Buddy. Try again."), never a terminal turn.
- PM side, local Lead: its harness id, as today. The daemon posts into the face chat (
- Pet and name. While listening and sending, the pet is the engine of the chat being spoken to: the Lead's on the
PM side,
buddy.engineon the Buddy side. The Pro's talk view shows a name on top and no "Sending to" label, so on the Buddy side the name is the Buddy's, in lilac. That is the Pro's form of the round's "Sending to your Buddy". - Refusals. A post the backend refused comes back as
voice.errorand shows through the existinghandle_voice_error→PRO_VOICE_ERRORpath. It never becomes a terminal turn; that rule is in the daemon already.
Wire
No new frame types. Everything below is what the daemon already sends to a round with the same hello.
| Hello flag (Pro → daemon) | Phase | Effect |
|---|---|---|
swarmChat: "v1" |
1 | Lead entries carry chat, chatId, chatName; supertab.recap carries chatId; supertab.notice and supertab.notice.read are sent |
swarmBuddy: "v1" |
2 | Lead entries carry buddies and buddy {chatId, name, engine, cells, color, live}; the face may be chat: "buddy"; the Pro may send supertab.side |
welcome features: swarm.remote (daemon → Pro) |
3 | the Pro may name a remote Lead by its Swarm id in voice.begin |
- The Pro never sends
swarmReview; the round does not either. - A daemon from before ignores the hello flags it does not know, and the Pro gets today's frames. The Pro then behaves as today, because every new field is optional when parsed.
Daemon
The one change is in cli/src/cable/cableSession.ts fitFrame:
- Problem. The Pro's JSON guard rejects any frame over 512 tokens whole (
cable_json_guard.c,CABLE_JSON_TOKENS).fitFramesizes thesupertabframe by bytes only.- A
swarmBuddyframe with 12 Leads, each with a Buddy, comes to about 440–480 tokens: 12 × (chatLead fields, plusbuddies, plus abuddyobject of 7 keys). - A Swarm with many Leads could therefore blank the Pro's Swarm view.
- A
- Fix. For a device whose hello says
board: pro,fits()also requiresjsonTokens(frame) <= SWARM_TOKENS_MAX(480, the budget theswarmsframe already uses). Its last step already deletesbuddyblocks from the least urgent Lead up, and that step is what brings the token count down. - The round keeps byte-only fitting and gets byte-identical frames.
Firmware
All changes are in devices/harness-pro/firmware/main/.
| File | Change |
|---|---|
cable/pro_cable.c |
hello flags (phase 1: swarmChat, phase 2: swarmBuddy); read_leads parses chat, chatId, chatName, buddies, buddy; handle_supertab reads side; handle_supertab_recap reads chatId; new handle_supertab_notice, handle_supertab_notice_read; handle_supertab_focus accepts an empty Lead; supertab.side sender |
cable/cable_features.{h,c} |
CABLE_FEATURE_SWARM_REMOTE for swarm.remote (phase 3), handed to the glue through pro_app_features |
cable/cable_types.h, pod/pod_model.{h,c} |
pod_lead_t: chat (enum lead/pm/group/buddy), chat_id[ID_MAX], chat_name[49] (as project), buddies, has_buddy, buddy {chat_id, name, engine, cells, color, live}, buddy_unread; pod_swarm_t: side; pod_unread_t gains tab[ID_MAX] and chat_id[ID_MAX]: a Swarm notice is an unread entry whose agent is the Lead id and whose tab is set, so the 16 cap, the order, the toast and the inbox rows are shared with agent notices |
pod/home/ph_lead.c |
chat name line, pill and header A, Buddy who row, no-Buddy view, lilac dot |
pod/home/ph_avatar.c (new) |
the Buddy avatar disc and pattern |
pod/home/ph_inbox.c |
Swarm notice rows merged into the list |
pod/home/ph_toast.c |
a Swarm notice's toast (project · Swarm name) |
app/pod_glue.{h,c} |
the last Lead shown per Swarm (pod_ui_t.lead_seen[SWARMS_CARD_MAX], set while a Lead view is on); empty-Lead focus in apply_lead_focus; pill hits; notice taps; talk_target for a remote Lead and the Buddy side |
app/pro_app.c, pro_app_api.h |
the new model entry points under the app lock |
The limits are the existing ones: SWARM_LEADS_MAX, ID_MAX 48, CABLE_NAME_MAX 40. A 48-byte chatName fits chat_name[49]; anything longer is cut on a character.
What does not change
- The Swarm card on Home, its pages and its pets.
- The horizontal swipe between Leads, the vertical scroll of the message, and
supertab.open/supertab.selectand their echo suppression. - Agent notices, Super Tab questions and their toasts.
- The round dial, which gets byte-identical frames.
Design (docs/feature-design-rules.md)
Reviewed revision: ______ Reviewer (another engine): ______
- Growth:
- Swarm notices share the unread list's
POD_UNREAD_MAX(16) and its 6 h TTL, the oldest going first. The glue keeps one last Lead per Swarm in a fixed array ofSWARMS_CARD_MAX. - The daemon keeps nothing new. [ ]
- Swarm notices share the unread list's
- Concurrency:
- Frames are parsed on the cable task into staging, and the model is changed under
pro_app_lock, as forsupertabtoday. - A pill tap and a desktop change can race. The daemon's newest-wins rule settles it, and the Pro draws what the
next
supertabsays. [ ]
- Frames are parsed on the cable task into staging, and the model is changed under
- Read cost:
- No new reads. The daemon already computes the face chat, recaps and notices for the round.
- With both a round and a Pro attached, each session reads as it does today for one round. [ ]
- Scale: 12 Leads with Buddies stay at or under 480 tokens (test). Beyond that, Buddy blocks drop first, then the
view shows "No Buddy here yet" for those Leads. That is a known limit, logged by
fitFrame. [ ] - Compatibility:
- A new Pro with an old daemon gets today's frames.
- An old Pro with a new daemon is unchanged, because it does not say the flags.
- The round is unchanged.
- Readers of the frames:
cableSession.ts,cable_client.c(round),pro_cable.c. [ ]
- Migration and rollback:
- CLI first (the token budget), then firmware. Each is safe alone.
- Rolling back the Pro firmware stops the flags, and the Pro returns to today's view. [ ]
- Audience:
- The face chat, PM recaps and Buddy chats are the signed-in person's own (
visibleState,groupView). - The daemon owns the USB device only for the console user, never the Team account. [ ]
- The face chat, PM recaps and Buddy chats are the signed-in person's own (
- Identity: reads and voice posts run as the signed-in person (
backend(this.core, …)), as for the round. [ ] - Failure:
- A lost
supertab.sideleaves the old side, and the pressed segment returns to it on the next frame. - A lost
notice.readleaves a row the person can tap, and the next replay drops it. - A frame over the guard is rejected whole. The daemon budget prevents that, and the guard's log line names it. [ ]
- A lost
- Platforms: daemons on macOS, Linux and Windows alike. Firmware ESP32-P4 only. [ ]
Testing
Each phase is one PR, with the failing test first.
- Daemon (
cli/src/cable/cableSession.spec.ts), phase 1 PR:- A
board: proswarmBuddysession with 12 Leads, every name at 48 bytes and a Buddy each: everysupertabframe hasjsonTokens≤ 480. The least urgent Leads'buddyblocks go first. - A round session with the same data gets byte-identical frames to today.
- A
- Firmware host tests (
devices/harness-pro/firmware/test:test_pod_model.c,test_ph_glue.c,test_ph_views.c,test_pro_app.py, golden):- Parse:
chat,chatId,chatName,buddies,buddy,side. Over-long strings are cut on a character, and wrong types are skipped without losing the frame. A frame without the fields parses as today. - Recap: a recap for another
chatIdis dropped, and the bubble shows "…" after a chat switch. - Focus:
- an empty Lead opens the Swarm on its last Lead, else the first;
- an unknown Swarm waits, then drops;
- the quiet window still holds a focus.
- Notices:
- add, replace per Lead and the 16 cap;
notice.readremoves the matchingchatIdonly;- a tap opens the Lead and sends
supertab.select; - a Buddy notice adds no row and no toast, and sets only the dot.
- Pill: a tap sends
supertab.sidewith the right side and does not start a talk. The pill is absent withoutbuddies. - Voice:
- a remote Lead's tap names its Swarm id only with
swarm.remote; - the Buddy side names the Lead with the Buddy side;
voice.errorends the voice state with the message.
- a remote Lead's tap names its Swarm id only with
- Views (golden, run count constant per screen): 1A–1C, 2A, 3A–3D, and Notices with a Swarm row. Ink stays inside 720 × 720.
bash test/run.shandmake device-test.
- Parse:
- On Diego's Pro (dev build 0.0.99, flashed with the repo scripts after Diego's yes, never force-flashed):
- The desktop opens a group, then the Lead chat: the Pro follows, and the name line comes and goes.
- The desktop opens another Swarm's Chat with PM: the Pro moves into that Swarm.
- A new Lead message makes a toast and a row. Opening the chat on the desktop removes both.
- The PM and Buddy buttons work both ways with the desktop, and the lilac dot shows and clears.
- Voice works for a remote Lead and for the Buddy. A refused post shows as a voice error.
raster_max_usin the alive line is no higher than before, and the link shows corrupt 0.
Unverified
- That 12 Leads with Buddies and 48-byte names exceed 480 tokens. The estimate is 440–480. The daemon test measures it first, and if it fits, the budget is kept as a guard.
How a voice turn names the Buddy side.Checked 2026-10-30: it does not.voice.begincarries the Lead's id (its local harness, or its Swarm id when remote), and the daemon takes the side it holds (swarmFaceOf,cableSession.ts:2758).Whether the fonts exist.Checked 2026-10-30:ph_sb_22,ph_sb_26,ph_sb_34andph_rg_28are in the Pro's set.