@linxiraos/pi-tui 1.3.1 → 1.4.0

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.
@@ -18,7 +18,7 @@ export declare enum NotifyProtocol {
18
18
  Osc99 = "\u001B]99;;",
19
19
  Osc9 = "\u001B]9;"
20
20
  }
21
- export type TerminalId = "kitty" | "ghostty" | "wezterm" | "iterm2" | "vscode" | "alacritty" | "warp" | "orca" | "otty" | "rio" | "tern" | "monstar" | "base" | "trueColor";
21
+ export type TerminalId = "kitty" | "ghostty" | "wezterm" | "iterm2" | "vscode" | "alacritty" | "warp" | "orca" | "otty" | "rio" | "tern" | "monstar" | "zetawork" | "base" | "trueColor";
22
22
  /** Terminal capability details used for rendering and protocol selection. */
23
23
  export declare class TerminalInfo {
24
24
  readonly id: TerminalId;
@@ -66,6 +66,7 @@ export type TerminalId =
66
66
  | "rio"
67
67
  | "tern"
68
68
  | "monstar"
69
+ | "zetawork"
69
70
  | "base"
70
71
  | "trueColor";
71
72
 
@@ -656,6 +657,15 @@ const KNOWN_TERMINALS = Object.freeze({
656
657
  // activating it focuses the Monstar window. The BEL path uses omp's own
657
658
  // `notify-send` fallback instead, which cannot focus a window.
658
659
  monstar: new TerminalInfo("monstar", ImageProtocol.Kitty, true, true, NotifyProtocol.Osc9, false, false, false, 2),
660
+ // zetawork is the workbench GUI's own terminal pane (`termide`
661
+ // `panel-terminal`): it sets TERM_PROGRAM=zetawork and renders Kitty
662
+ // graphics itself — direct placement only, no Unicode placeholders, which
663
+ // is why the id is not in the placeholder allowlist. It answers the cell
664
+ // size query (CSI 16 t) with its real device-pixel cell, so images are
665
+ // rasterized at the density the surface paints at. Its emulator renders
666
+ // OSC 8 links itself; notifications stay on BEL because the GUI has no
667
+ // notifier.
668
+ zetawork: new TerminalInfo("zetawork", ImageProtocol.Kitty, true, true),
659
669
  });
660
670
 
661
671
  /** Resolve terminal identity from environment markers used by common emulators. */
@@ -678,6 +688,7 @@ export function detectTerminalId(env: NodeJS.ProcessEnv = Bun.env): TerminalId {
678
688
  if (caseEq(program, "rio")) return "rio";
679
689
  if (caseEq(program, "tern")) return "tern";
680
690
  if (caseEq(program, "monstar")) return "monstar";
691
+ if (caseEq(program, "zetawork")) return "zetawork";
681
692
  return null;
682
693
  }
683
694
 
package/src/tools/hub.ts CHANGED
@@ -181,6 +181,8 @@ export interface CoordinationDetails {
181
181
  cancelled?: { id: string; status: CancelStatus }[];
182
182
  /** Running subagents not represented by a job row in this result. */
183
183
  agents?: AgentActivitySnapshot[];
184
+ /** `wait` returned early because blocking would deadlock (mesh S6). */
185
+ status?: "peer-waiting-on-you";
184
186
  }
185
187
 
186
188
  /** Hub result details: coordination snapshots or launch (process) state. */
@@ -269,7 +271,7 @@ export interface IrcMessage {
269
271
  /** Delivery outcome for one peer recipient. */
270
272
  export interface IrcDeliveryReceipt {
271
273
  to: string;
272
- outcome: "injected" | "woken" | "revived" | "failed";
274
+ outcome: "injected" | "woken" | "revived" | "queued" | "failed";
273
275
  error?: string;
274
276
  }
275
277
  /** Broker-facing launch parameters; the hub adapts its `ps` op to `list` before calling in. */
@@ -990,6 +992,7 @@ function outcomeColor(outcome: IrcDeliveryReceipt["outcome"]): ToolUIColor {
990
992
  case "woken":
991
993
  return "success";
992
994
  case "revived":
995
+ case "queued":
993
996
  return "warning";
994
997
  case "injected":
995
998
  return "accent";
@@ -23,7 +23,11 @@ export interface IrcMessage {
23
23
  /** Delivery outcome for one peer recipient. */
24
24
  export interface IrcDeliveryReceipt {
25
25
  to: string;
26
- outcome: "injected" | "woken" | "revived" | "failed";
26
+ /**
27
+ * `queued` is the cross-process offline path: the message is in the peer's
28
+ * persistent mailbox and will be injected when its process next starts.
29
+ */
30
+ outcome: "injected" | "woken" | "revived" | "queued" | "failed";
27
31
  error?: string;
28
32
  }
29
33
  /** Status ordering for peer rosters in child prompts. */
package/src/tools/irc.ts CHANGED
@@ -26,7 +26,11 @@ export interface IrcMessage {
26
26
  /** Delivery outcome for one peer recipient. */
27
27
  export interface IrcDeliveryReceipt {
28
28
  to: string;
29
- outcome: "injected" | "woken" | "revived" | "failed";
29
+ /**
30
+ * `queued` is the cross-process offline path: the message is in the peer's
31
+ * persistent mailbox and will be injected when its process next starts.
32
+ */
33
+ outcome: "injected" | "woken" | "revived" | "queued" | "failed";
30
34
  error?: string;
31
35
  }
32
36
  /** Status ordering for peer rosters in child prompts. */
@@ -321,6 +321,7 @@ const RECEIPT_TONE: Record<IrcDeliveryReceipt["outcome"], TspTone> = {
321
321
  injected: "success",
322
322
  woken: "success",
323
323
  revived: "warning",
324
+ queued: "warning",
324
325
  failed: "error",
325
326
  };
326
327
 
@@ -96,6 +96,12 @@ export interface CoordinationDetails {
96
96
  agents?: AgentActivitySnapshot[];
97
97
  /** `wait` was cut short by steering, a peer message, or a completion notice that injects next. */
98
98
  interrupted?: boolean;
99
+ /**
100
+ * `wait` returned early without a message because continuing would deadlock:
101
+ * the peer it was waiting on is itself waiting on this agent. Both sides can
102
+ * keep working — answer the peer, then wait again.
103
+ */
104
+ status?: "peer-waiting-on-you";
99
105
  }
100
106
  /** Pending wait frame. */
101
107
  declare function waitRenderCall(_args: object, _options: RenderResultOptions, uiTheme: Theme): Component;
package/src/tools/wait.ts CHANGED
@@ -131,6 +131,12 @@ export interface CoordinationDetails {
131
131
  agents?: AgentActivitySnapshot[];
132
132
  /** `wait` was cut short by steering, a peer message, or a completion notice that injects next. */
133
133
  interrupted?: boolean;
134
+ /**
135
+ * `wait` returned early without a message because continuing would deadlock:
136
+ * the peer it was waiting on is itself waiting on this agent. Both sides can
137
+ * keep working — answer the peer, then wait again.
138
+ */
139
+ status?: "peer-waiting-on-you";
134
140
  }
135
141
 
136
142
  // =============================================================================