pi-straw-boss 0.13.2 → 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 +1 -1
- package/src/index.ts +1 -1
- package/src/order.ts +5 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-straw-boss",
|
|
3
|
-
"version": "0.13.
|
|
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
|
@@ -6,9 +6,10 @@ import { ARROW, type HerdrRun, type HerdrTab, isSub, MARK, type Pane, panes, typ
|
|
|
6
6
|
// and then the tabs in tab order, in each tab the main agent and then the members, and every subagent right after the session that launched it,
|
|
7
7
|
// its own subagents after it in turn. Segments are fixed-width and `.`-separated, so plain string order is the numeric order of every segment,
|
|
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
|
-
// - `sb_mark`: a short label that says what a net member is, a star (U+F005)
|
|
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
|
-
// - `
|
|
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,10 +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 glyph and their tab label in the mark alike, so both rows read the same.
|
|
64
64
|
const tab = tabList.find((t) => t.tab_id === pane?.tab_id)?.label || null;
|
|
65
|
-
const
|
|
66
|
-
return { own: { sb_order: key ?? null, sb_mark:
|
|
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 };
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
/**
|