Skip to content

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.

Phone: carry the one-Buddy fields across so the parity test holds (#2452)

0xken15f28fa3bda856
diff --git a/mobile/lib/swarm/model.dart b/mobile/lib/swarm/model.dart
index 8fa036f78..8141ecb10 100644
--- a/mobile/lib/swarm/model.dart
+++ b/mobile/lib/swarm/model.dart
@@ -128,6 +128,8 @@ class SuperTabAgent {
: id = _text(row, 'id'),
hasProjectId = row['projectId'] != null,
projectId = row['projectId'] as String? ?? 'lead',
+ buddyScope = row['buddyScope'] as String?,
+ buddyNarrow = row['buddyNarrow'] == true,
name = _text(row, 'name'),
displayName = row['displayName'] as String?,
machineId = _text(row, 'machineId'),
@@ -157,6 +159,13 @@ class SuperTabAgent {
},
confidential = row['confidential'] == true,
configuration = Map.unmodifiable(superTabMap(row['configuration']));
+
+ /// `swarm` for a person's one Buddy for the whole Swarm, as the desktop's model reads it; null otherwise.
+ final String? buddyScope;
+
+ /// Whether that Buddy reads only a narrowed set of projects (desktop model); not drawn on the phone yet.
+ final bool buddyNarrow;
+
final String id, projectId, name, machineId, harnessId, contributorId;
/// Set by its contributor or its project's Lead; null draws its pattern.
@@ -514,6 +523,7 @@ class SuperTabSnapshot {
localModels = SuperTabLocalModels.read(row['localModels']),
threadSessions = row['threadSessions'] == true,
sessionsFromChat = row['sessionsFromChat'] == true,
+ swarmBuddy = row['swarmBuddy'] == true,
mentionsWaiting = (row['mentionsWaiting'] as num?)?.toInt() ?? 0,
mentionsDigest = row['mentionsDigest'] as String?,
decisionsWaiting = (row['decisionsWaiting'] as num?)?.toInt() ?? 0,
@@ -595,6 +605,10 @@ class SuperTabSnapshot {
/// Buddy chat (read/contract.ts `sessionsFromChat`); false from an older one.
final bool sessionsFromChat;
+ /// One Buddy per person for the whole Swarm (backend one-Buddy stack), as the desktop's model reads it; the phone
+ /// does not draw it yet.
+ final bool swarmBuddy;
+
/// The reader's tags still waiting for them, Swarm-wide; 0 from a backend
/// before tags (spec 2026-10-24-lead-mentions.md).
final int mentionsWaiting;
diff --git a/mobile/lib/swarm/parts.dart b/mobile/lib/swarm/parts.dart
index 3a6744991..e3737700d 100644
--- a/mobile/lib/swarm/parts.dart
+++ b/mobile/lib/swarm/parts.dart
@@ -350,6 +350,8 @@ class SuperTabParts {
if (_derived['threadSessions'] == true) state['threadSessions'] = true;
// And one that also takes it on a top-level message in a Buddy chat.
if (_derived['sessionsFromChat'] == true) state['sessionsFromChat'] = true;
+ // And one that gives each person one Buddy for the whole Swarm.
+ if (_derived['swarmBuddy'] == true) state['swarmBuddy'] = true;
if (_readMarks.isNotEmpty) state['readMarks'] = Map.of(_readMarks);
if (_threadMarks.isNotEmpty) {
state['threadMarks'] = {