@volter/supercode-teams 0.2.131 → 0.2.132

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.
Files changed (2) hide show
  1. package/machine.mjs +5 -4
  2. package/package.json +1 -1
package/machine.mjs CHANGED
@@ -1307,7 +1307,7 @@ export class TeamsMachine extends MachineCore {
1307
1307
  // No harness callback: discovery may be the harness's own caller.
1308
1308
  const whole = operator || holds(admitted, 'view', '*');
1309
1309
  if (!whole && !observesPanes(admitted)) need('view', '*');
1310
- const sessions = (await this.host.listSessions()).filter(s => s.contextKey && (whole || holds(admitted, 'observe', `pane:${s.contextKey}`)));
1310
+ const sessions = (await this.host.listSessions()).filter(s => s.contextKey && !s.dead && (whole || holds(admitted, 'observe', `pane:${s.contextKey}`)));
1311
1311
  return Promise.all(sessions.map(async session => {
1312
1312
  const screen = await Promise.resolve().then(() => this.host.capture(session.id, { lines: 100, preserveEscapes: true })).catch(() => null);
1313
1313
  const kind = this.#paneKind(session.contextKey, session);
@@ -1328,7 +1328,7 @@ export class TeamsMachine extends MachineCore {
1328
1328
  const rows = await this.attentionEvidence();
1329
1329
  // `title` is what a viewer should show: the override if one is set, else the tmux label.
1330
1330
  return rows.filter((row) => row.session.id && shown(row.session.contextKey)).map(({ session: s, attention, rank, notify, evidence }) => ({
1331
- pane: s.contextKey, label: s.label, title: titles[`pane:${s.contextKey}`] ?? s.label, cwd: s.cwd, owned: s.owned, activeCommand: s.activeCommand, pid: s.rootPid ?? null, size: s.size, suspended: this.suspended.has(s.contextKey),
1331
+ pane: s.contextKey, dead: Boolean(s.dead), label: s.label, title: titles[`pane:${s.contextKey}`] ?? s.label, cwd: s.cwd, owned: s.owned, activeCommand: s.activeCommand, pid: s.rootPid ?? null, size: s.size, suspended: this.suspended.has(s.contextKey),
1332
1332
  attention, rank, notify, evidence,
1333
1333
  }));
1334
1334
  }
@@ -1409,7 +1409,8 @@ export class TeamsMachine extends MachineCore {
1409
1409
  if (!found) return null;
1410
1410
  const session = await this.#paneByContext(found.pane);
1411
1411
  return {
1412
- key: found.key, pane: found.pane, live: Boolean(session), label: session?.label ?? null, activeCommand: session?.activeCommand ?? null,
1412
+ exit: session?.dead ? deadPaneExit(session) : !session ? paneExit(found.pane) : null,
1413
+ key: found.key, pane: found.pane, live: Boolean(session && !session.dead), label: session?.label ?? null, activeCommand: session?.activeCommand ?? null,
1413
1414
  ...initialInputFacts(found),
1414
1415
  };
1415
1416
  }
@@ -1420,7 +1421,7 @@ export class TeamsMachine extends MachineCore {
1420
1421
  const rows = [];
1421
1422
  for (const found of this.launches.all()) {
1422
1423
  const session = found.pane ? await this.#paneByContext(found.pane) : null;
1423
- rows.push({ key: found.key, pane: found.pane ?? null, kind: found.kind ?? null, by: found.by ?? null, status: found.status ?? null, at: found.t, live: Boolean(session), ...initialInputFacts(found) });
1424
+ rows.push({ key: found.key, pane: found.pane ?? null, kind: found.kind ?? null, by: found.by ?? null, status: found.status ?? null, at: found.t, live: Boolean(session && !session.dead), ...initialInputFacts(found) });
1424
1425
  }
1425
1426
  return rows;
1426
1427
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volter/supercode-teams",
3
- "version": "0.2.131",
3
+ "version": "0.2.132",
4
4
  "type": "module",
5
5
  "description": "A machine daemon serving this machine's doors, and a local or remote Teams server for shared session discovery, OpenTelemetry ingestion and access to enrolled machines.",
6
6
  "license": "MIT",