pi-straw-boss 0.13.1 → 0.13.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-straw-boss",
3
- "version": "0.13.1",
3
+ "version": "0.13.3",
4
4
  "description": "Straw Boss coordination for pi in Herdr: sessions join a tab's net by choice, the first joiner is its main agent, a workspace tower opens on demand with a live monitoring dashboard, and boss_broadcast reaches the rest",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/index.ts CHANGED
@@ -485,7 +485,7 @@ export function createStrawBoss({ run = herdrRun, api = herdrApi(), call = herdr
485
485
  const held = holdsTower;
486
486
  holdsTower = false;
487
487
  if (!role() || !at) return;
488
- await report(run, "pane", at.paneId, { sb_role: null, sb_opened_by: null, sb_order: null, sb_mark: null, sb_indent: null, sb_name: null, sb_tab: null }).catch(() => {});
488
+ await report(run, "pane", at.paneId, { sb_role: null, sb_opened_by: null, sb_order: null, sb_mark: null, sb_indent: null, sb_name: null, sb_tab: null, sb_main_tab: null, sb_member_tab: null }).catch(() => {});
489
489
  await clearOrder(run, [...kids]);
490
490
  if (held) await report(run, "workspace", at.workspaceId, { tower: null }).catch(() => {});
491
491
  // A tower that quits leaves its tab as a plain shell: close the tab, but only when this pane is all it holds. A reload, /new, resume or fork keeps the tab.
package/src/order.ts CHANGED
@@ -8,7 +8,8 @@ import { ARROW, type HerdrRun, type HerdrTab, isSub, MARK, type Pane, panes, typ
8
8
  // and a subagent's key is its parent's key plus one more segment, which sorts after the parent and before the parent's next sibling.
9
9
  // - `sb_mark`: a short label that says what a net member is, a star (U+F005) alone for a main agent, a person (U+F007) alone for a member, and `[sub]` and the launcher's name for a subagent.
10
10
  // A tower has none: its tab already carries the radio tower glyph.
11
- // - `sb_tab`: a main agent's or member's tab label, which the row shows in place of Herdr's tab item.
11
+ // - `sb_main_tab` / `sb_member_tab`: a main agent's or a member's tab label, one token per role so a row can color each (a Herdr rule sees only its own token).
12
+ // `sb_tab`, which 0.7.2 to 0.13.1 wrote, is cleared.
12
13
  // - `sb_indent`: a tree branch on a subagent alone, like Herdr's Spaces panel draws a worktree: `├─` while a later subagent of the same launcher is marked, `└─` on the last. A row put before the state icon shows it as the
13
14
  // indent under the launcher. A tower, a main agent and a member carry none.
14
15
  // - `sb_name`: a subagent's own name, as pi-herdr-agents shows it. Herdr's pane label held it until a new server dropped the label; a row can show the token instead. A subagent alone carries one.
@@ -60,9 +61,9 @@ export async function netTokens(run: HerdrRun, place: Place, role: "tower" | "ma
60
61
  const [ps, all, tabList] = [await panes(run), await workspaces(run), await tabs(run, place.workspaceId)];
61
62
  const pane = ps.find((p) => p.pane_id === place.paneId), key = pane && orderKey(role, pane, ps, all, tabList);
62
63
  const joined = new Set(ps.filter((p) => p.tokens?.sb_role).map((p) => p.pane_id));
63
- // A main agent and a member carry their mark and their tab label alike, so both fit the same one row; `sb_tab` stands for Herdr's tab item.
64
64
  const tab = tabList.find((t) => t.tab_id === pane?.tab_id)?.label || null;
65
- return { own: { sb_order: key ?? null, sb_mark: role === "tower" ? null : MARK[role], sb_indent: null, sb_name: null, sb_tab: role === "tower" ? null : tab }, kids: key ? descendants(pane, key, name, ps, now) : [], joined };
65
+ const labels = { sb_main_tab: role === "main" ? tab : null, sb_member_tab: role === "member" ? tab : null, sb_tab: null };
66
+ return { own: { sb_order: key ?? null, sb_mark: role === "tower" ? null : MARK[role], sb_indent: null, sb_name: null, ...labels }, kids: key ? descendants(pane, key, name, ps, now) : [], joined };
66
67
  }
67
68
 
68
69
  /**