shadok-ai 0.19.69 β†’ 0.19.70

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/README.md CHANGED
@@ -268,8 +268,8 @@ Enter to skip; you can add it later from the web UI).
268
268
  children and nothing else, so a busy channel never wakes it. What arrives is
269
269
  the child's own summary plus pointers (branch, diff link) β€” never the diff
270
270
  itself, which on a large session costs far more than it is worth. The link is
271
- set automatically at spawn; you can also change it by hand. A πŸ”— on the tab
272
- marks any agent that has a link, and its menu cuts it from **either** end β€” the
271
+ set automatically at spawn; you can also change it by hand: an agent's tab
272
+ menu cuts it from **either** end β€” the
273
273
  child's own "Detach from…", or, on the parent, "Children reporting here…" to
274
274
  drop an agent whose reports you no longer want. An agent can do the same over
275
275
  the CLI with `pilotctl set-parent <id> <parent|none>`.
@@ -118,8 +118,8 @@ attaches it elsewhere. To change the link on an agent that is **already
118
118
  running** β€” detach one whose notifications you no longer want, or move it under
119
119
  a different lead β€” use `set-parent <id> <parent-id|none>`. In the cockpit the
120
120
  same thing is a click: an agent's tab menu offers "Detach from…" (child side)
121
- and, on the parent, "Children reporting here…", and a πŸ”— on the tab marks any
122
- agent that has a link.
121
+ and, on the parent, "Children reporting here…"; the agents column draws the
122
+ link as a tree, children indented under their parent.
123
123
 
124
124
  ## Talking across groups: a letter, not a remote control (`talk`)
125
125
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shadok-ai",
3
- "version": "0.19.69",
3
+ "version": "0.19.70",
4
4
  "main": "dist/session.js",
5
5
  "scripts": {
6
6
  "test": "node --import tsx --test --test-timeout=120000 test/*.ts context/*/test/*.test.mjs",
package/public/index.html CHANGED
@@ -326,9 +326,6 @@
326
326
  /* Same for the opposite: an agent with scheduled prompts can speak without
327
327
  anyone having asked it anything. */
328
328
  .tab .cron, .tab .tg { font-size: 9px; opacity: 0.75; flex: 0 0 auto; }
329
- /* A parent/child link exists on this agent (it reports to another, or others
330
- report to it). Clicking opens the tab menu, where the link can be cut. */
331
- .tab .link { font-size: 9px; opacity: 0.75; flex: 0 0 auto; cursor: pointer; }
332
329
  /* Background shells the agent left running. Last of the row on purpose: it is
333
330
  the most transient thing a tab says, so it must not shift the icons that sit
334
331
  still. It TURNS because a stopped hourglass and a running one look the same,
@@ -626,6 +623,10 @@
626
623
  without it the tab grows by a line as they appear (jump / clip). */
627
624
  .tab-row2 { display: flex; align-items: baseline; gap: 6px; min-height: 12px; line-height: 1.1; }
628
625
  .tab-row2 .ctxnum { margin-left: auto; }
626
+ /* The status icons, pushed to the right of row 2 (under the βœ•). */
627
+ .tab-row2 .tab-icons { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; align-self: center; }
628
+ .tab-row2 .tab-icons + .ctxnum { margin-left: 0; }
629
+ .tab-row2 .tab-icons [hidden] { display: none; }
629
630
  /* Boot: each row's "xxx ago" + % + bar ease in one after the other as the
630
631
  glance lands (paintGlance) β€” a quick cascade top to bottom instead of one
631
632
  late burst. --gi is the row's rank, capped so the tail never drags. */
@@ -848,7 +849,7 @@
848
849
  .kin-body.folded { display: none; }
849
850
  /* The fold toggle on a parent's tab: caret + how many agents sit under it.
850
851
  Folded, it carries the mood of what it hides (same three as a folder). */
851
- .tab .kin { flex: 0 0 auto; cursor: pointer; font-size: 10px; line-height: 1; padding: 2px 4px; border-radius: 4px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
852
+ .tab .kin { flex: 0 0 auto; cursor: pointer; font-size: 10px; line-height: 1; padding: 1px 4px; border-radius: 4px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
852
853
  .tab .kin:hover { color: var(--amber); background: var(--amber-soft); }
853
854
  .tab .kin.needs-answer { background: color-mix(in srgb, var(--amber) 28%, transparent); color: var(--text); font-weight: 700; animation: breathe 1.2s ease-in-out infinite; }
854
855
  .tab .kin.unread { color: var(--phosphor); font-weight: 700; }
@@ -3267,6 +3268,26 @@
3267
3268
 
3268
3269
  /* Channel header melts into the conversation instead of a ruled band. */
3269
3270
  #chanBar { background: transparent; border-bottom: 0; }
3271
+ /* Frosted glass: the header floats OVER the conversation, which scrolls
3272
+ underneath and shows through, blurred. The bar stays in the flow and pulls
3273
+ what follows up under itself by its own height (--chanbar-h, measured in JS
3274
+ since the bar wraps on a phone); the transcript gives that height back as
3275
+ top padding, so the first message still starts below the bar. Only where
3276
+ the blur exists: without it a see-through bar is just unreadable text over
3277
+ text, so those browsers keep the plain header. */
3278
+ @supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
3279
+ #chanBar {
3280
+ position: relative; z-index: 6;
3281
+ margin-bottom: calc(-1 * var(--chanbar-h, 0px));
3282
+ background: color-mix(in srgb, var(--pane-main, var(--bg)) 58%, transparent);
3283
+ -webkit-backdrop-filter: blur(20px) saturate(180%);
3284
+ backdrop-filter: blur(20px) saturate(180%);
3285
+ border-bottom: 1px solid color-mix(in srgb, var(--text) 9%, transparent);
3286
+ box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 16%, transparent), 0 8px 20px -16px rgba(0, 0, 0, 0.45);
3287
+ }
3288
+ .transcript { padding-top: calc(22px + var(--chanbar-h, 0px)); scroll-padding-top: var(--chanbar-h, 0px); }
3289
+ @media (max-width: 640px) { .transcript { padding-top: calc(14px + var(--chanbar-h, 0px)); } }
3290
+ }
3270
3291
 
3271
3292
  /* Messages: rounder bubbles with a tail corner; yours carry the accent. */
3272
3293
  .bubble { border-radius: 18px; }
@@ -5480,18 +5501,6 @@
5480
5501
  update.className = "update";
5481
5502
  update.hidden = true;
5482
5503
  update.addEventListener("click", (e) => { e.stopPropagation(); handleClaudeUpdate(tab); });
5483
- // Parent/child link indicator. Shown when this agent reports to another OR
5484
- // others report to it; clicking opens the tab menu, where either link can be
5485
- // cut (both the child-side "Detach from…" and the parent-side children list).
5486
- const link = document.createElement("span");
5487
- link.className = "link";
5488
- link.hidden = true;
5489
- link.textContent = "πŸ”—";
5490
- link.addEventListener("click", (e) => {
5491
- e.stopPropagation();
5492
- const r = link.getBoundingClientRect();
5493
- openTabMenu(tab, r.left, r.bottom + 4);
5494
- });
5495
5504
  // Fold toggle for the agents this one launched (drawn indented under it).
5496
5505
  // Hidden until it has any; painted by paintKin.
5497
5506
  const kin = document.createElement("span");
@@ -5505,8 +5514,8 @@
5505
5514
  paintKin();
5506
5515
  });
5507
5516
  // Name + time stacked (the time UNDER the title, so as not to truncate it).
5508
- // Two rows: row 1 = led + name + icons; row 2 FULL WIDTH = "xxx ago" on the
5509
- // left, context % hard right (no longer hidden behind the icons).
5517
+ // Two rows: row 1 = name + timer + βœ•; row 2 FULL WIDTH = "xxx ago" on the
5518
+ // left, the status icons and the context % on the right.
5510
5519
  // Teams-style avatar: initials on a colour derived from the name, with the
5511
5520
  // state LED riding its corner as a presence dot. Follows renames.
5512
5521
  const avatar = document.createElement("span");
@@ -5518,10 +5527,15 @@
5518
5527
  paintAvatar();
5519
5528
  const row1 = document.createElement("div");
5520
5529
  row1.className = "tab-row1";
5521
- row1.append(name, timer, mute, cron, tg, shells, monitors, update, link, kin, close);
5530
+ // Row 1 keeps the name, the running timer and the βœ•; every status icon sits
5531
+ // on row 2, so a long name is no longer truncated to make room for them.
5532
+ row1.append(name, timer, close);
5533
+ const icons = document.createElement("span");
5534
+ icons.className = "tab-icons";
5535
+ icons.append(mute, cron, tg, shells, monitors, update, kin);
5522
5536
  const row2 = document.createElement("div");
5523
5537
  row2.className = "tab-row2";
5524
- row2.append(lastAt, ctxNum);
5538
+ row2.append(lastAt, icons, ctxNum);
5525
5539
  btn.append(avatar, row1, row2);
5526
5540
  // Context-window usage no longer paints on the tab β€” it lives in the agent
5527
5541
  // menu now (tm-ctxbar), kept as `tab.contextPct` and read when the menu opens.
@@ -5550,7 +5564,7 @@
5550
5564
  updateState: null, // Claude Code update: "restart" (reload to apply) | "failed" (install then reload) | null
5551
5565
  staleReasons: [], // server-side "reload to apply" reasons: prompt/guardrails/skills/secrets changed, auth token expired, claude binary updated
5552
5566
  btnEl: btn, ledEl: led, nameEl: name, timerEl: timer,
5553
- ctxNumEl: ctxNum, muteEl: mute, cronEl: cron, tgEl: tg, shellsEl: shells, monitorsEl: monitors, updateEl: update, linkEl: link, kinEl: kin,
5567
+ ctxNumEl: ctxNum, muteEl: mute, cronEl: cron, tgEl: tg, shellsEl: shells, monitorsEl: monitors, updateEl: update, kinEl: kin,
5554
5568
  mirror: false, // mirrored into Telegram? (the ✈️ on the tab)
5555
5569
  lastAtEl: lastAt,
5556
5570
  };
@@ -6057,26 +6071,6 @@
6057
6071
  return tab.sessionId ? tabs.filter((t) => t.sessionId && t.parent === tab.sessionId) : [];
6058
6072
  }
6059
6073
 
6060
- /**
6061
- * Light the πŸ”— on a tab when it has a parent OR any children, and say which in
6062
- * the tooltip. A parent change moves the badge on BOTH ends (the child gains a
6063
- * parent, the parent gains a child), so callers refresh every tab β€” cheap, and
6064
- * it never leaves one side stale.
6065
- */
6066
- function refreshLinkBadge(tab) {
6067
- if (!tab.linkEl) return;
6068
- const kids = childTabsOf(tab);
6069
- const hasParent = !!tab.parent;
6070
- tab.linkEl.hidden = !hasParent && kids.length === 0;
6071
- const bits = [];
6072
- if (hasParent) bits.push("Reports to " + parentLabel(tab.parent));
6073
- if (kids.length) bits.push(kids.length + (kids.length > 1 ? " agents report here" : " agent reports here"));
6074
- tab.linkEl.title = bits.join(" Β· ");
6075
- }
6076
- function refreshAllLinkBadges() {
6077
- for (const t of tabs) refreshLinkBadge(t);
6078
- }
6079
-
6080
6074
  /**
6081
6075
  * Second page of the tab menu: which agent this one reports to.
6082
6076
  *
@@ -7562,6 +7556,15 @@
7562
7556
  // Collapsing the rail, resizing the window, or a group renamed to a longer
7563
7557
  // name moves the rows: follow without gliding.
7564
7558
  if (window.ResizeObserver) new ResizeObserver(() => placeRailPill({ animate: false })).observe(railList);
7559
+ // The glass header overlaps the conversation by its own height (see the CSS
7560
+ // of #chanBar): publish that height, 0 while the bar is hidden. Measured, not
7561
+ // assumed β€” the bar wraps on a narrow screen and its height follows.
7562
+ {
7563
+ const bar = $("chanBar"), pane = bar.closest(".chat-pane");
7564
+ const publish = () => pane.style.setProperty("--chanbar-h", (bar.hidden ? 0 : bar.offsetHeight) + "px");
7565
+ if (window.ResizeObserver) new ResizeObserver(publish).observe(bar);
7566
+ publish();
7567
+ }
7565
7568
 
7566
7569
  let railFrame = 0;
7567
7570
  let railSig = "";
@@ -7987,9 +7990,10 @@
7987
7990
  }
7988
7991
  }
7989
7992
  lastChannelIds = current;
7990
- // Parents are re-applied above from the registry; refresh every πŸ”— once the
7991
- // pass has settled, so a link made on another device lights up here too.
7992
- refreshAllLinkBadges();
7993
+ // Parents are re-applied above from the registry; re-nest once the pass has
7994
+ // settled, so a link made on another device redraws the tree here too. A
7995
+ // changed `parent` is not a DOM mutation, so nothing else would trigger it.
7996
+ layoutFolders();
7993
7997
  }
7994
7998
 
7995
7999
  // Is the server currently starting this instance's lead agent? Never inferred
@@ -11432,7 +11436,7 @@
11432
11436
  // Broadcast to every client, like `profile`: attaching from one tab
11433
11437
  // must update the others without a reload.
11434
11438
  t.parent = msg.parent;
11435
- refreshAllLinkBadges(); // moves the πŸ”— on both ends of the link
11439
+ layoutFolders(); // the tree is derived from this link: redraw it now
11436
11440
  break;
11437
11441
  case "tokens":
11438
11442
  t.tokens = msg.tokens;