@esso0428/pi-subagents 0.17.12 → 0.17.13

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/CHANGELOG.md CHANGED
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.17.13] - 2026-10-01
11
+
12
+ ### Fixed
13
+ - **Repaired the Agents widget lifecycle and interaction model**: runtime agent updates are cached and rendered without stale rows, modal history selectors suspend background widget input, and nested agents remain visible under their owning parent.
14
+ - **Preserved durable transcript-backed agents after runtime cleanup**, including model and accumulated-cost details for completed and historical rows.
15
+ - **Improved widget layout resilience** with correct scrollbar bounds and restoration of the v0.17.6 selector foundation across short and long terminal layouts.
16
+
10
17
  ## [0.17.12] - 2026-09-30
11
18
 
12
19
  ### Fixed
@@ -4,19 +4,17 @@
4
4
  * Displays a tree of agents with animated spinners, live stats, and activity descriptions.
5
5
  * Uses the callback form of setWidget for themed rendering.
6
6
  */
7
- import { type AgentManager } from "../agent-manager.js";
8
- import type { AgentInvocation, SubagentType, WidgetMode } from "../types.js";
7
+ import type { AgentManager } from "../agent-manager.js";
8
+ import type { AgentInvocation, AgentRecord, SubagentType, WidgetMode } from "../types.js";
9
9
  import { type LifetimeUsage, type SessionLike } from "../usage.js";
10
10
  /** Maximum number of rendered lines before overflow collapse kicks in. */
11
11
  export declare const MAX_WIDGET_LINES = 12;
12
- /** Number of lines available above an editor, retaining room for the prompt. */
13
- export declare function getWidgetLineBudget(terminalRows: number): number;
14
- export type AgentWidgetOpenMode = "live" | "history";
15
- export interface AgentWidgetOptions {
16
- canOpenHistory?: (record: import("../types.js").AgentRecord) => boolean;
17
- onOpen?: (record: import("../types.js").AgentRecord, mode: AgentWidgetOpenMode) => void;
18
- showCost?: () => boolean;
19
- }
12
+ /**
13
+ * Derive the widget ceiling from the terminal height while retaining the
14
+ * historical MAX_WIDGET_LINES ceiling. Very short terminals may have no room
15
+ * for the widget; that is preferable to consuming the editor/input area.
16
+ */
17
+ export declare function getWidgetLineBudget(rows: number): number;
20
18
  /** Braille spinner frames for animated running indicator. */
21
19
  export declare const SPINNER: string[];
22
20
  /** Statuses that indicate an error/non-success outcome (used for linger behavior and icon rendering). */
@@ -25,6 +23,19 @@ export type Theme = {
25
23
  fg(color: string, text: string): string;
26
24
  bold(text: string): string;
27
25
  };
26
+ export type AgentWidgetOpenMode = "live" | "history";
27
+ export type AgentWidgetOpenCallback = (record: AgentRecord, mode: AgentWidgetOpenMode) => void | Promise<void>;
28
+ export interface AgentWidgetOptions {
29
+ canOpenHistory?: (record: AgentRecord) => boolean;
30
+ onOpen?: AgentWidgetOpenCallback;
31
+ showCost?: () => boolean;
32
+ }
33
+ /** @deprecated Use AgentWidgetOpenMode. */
34
+ export type AgentOpenMode = AgentWidgetOpenMode;
35
+ /** @deprecated Use AgentWidgetOpenCallback. */
36
+ export type AgentOpenCallback = AgentWidgetOpenCallback;
37
+ /** @deprecated Use AgentWidgetOptions.canOpenHistory. */
38
+ export type AgentHistoryCapability = AgentWidgetOptions["canOpenHistory"];
28
39
  export type UICtx = {
29
40
  setStatus(key: string, text: string | undefined): void;
30
41
  setWidget(key: string, content: undefined | ((tui: any, theme: Theme) => {
@@ -49,7 +60,7 @@ export interface AgentActivity {
49
60
  turnCount: number;
50
61
  /** Effective max turns for this agent (undefined = unlimited). */
51
62
  maxTurns?: number;
52
- /** Lifetime token usage, including partial runs. */
63
+ /** Lifetime usage breakdown — see LifetimeUsage docs. */
53
64
  lifetimeUsage: LifetimeUsage;
54
65
  }
55
66
  /** Metadata attached to Agent tool results for custom rendering. */
@@ -65,7 +76,7 @@ export interface AgentDetails {
65
76
  activity?: string;
66
77
  /** Current spinner frame index (for animated running indicator). */
67
78
  spinnerFrame?: number;
68
- /** Short label for the model the run used, e.g. "haiku 4.5". */
79
+ /** Short model name if different from parent (e.g. "haiku", "sonnet"). */
69
80
  modelName?: string;
70
81
  /** Notable config tags (e.g. ["thinking: high", "isolated"]). */
71
82
  tags?: string[];
@@ -82,20 +93,6 @@ export interface AgentDetails {
82
93
  export declare function fgPreservingNestedStyles(theme: Theme, color: string, text: string): string;
83
94
  /** Format a token count compactly: "33.8k token", "1.2M token". */
84
95
  export declare function formatTokens(count: number): string;
85
- /**
86
- * Format a cost as `~$0.0042`, or "" when there is nothing to show.
87
- *
88
- * The tilde is load-bearing: this is pi's own estimate from the model's listed
89
- * rates, not a billed figure, and the surfaces that print it sit next to token
90
- * counts that ARE exact.
91
- *
92
- * Nothing is printed for zero, which is also what a model with no pricing data
93
- * reports: `$0.00` beside a local model's tokens would claim its cost was
94
- * measured and found to be nothing, rather than never measured at all. For the
95
- * same reason a real cost too small for four decimals reads `<$0.0001` — it was
96
- * measured, and rounding it to `~$0.0000` would say the opposite.
97
- */
98
- export declare function formatCost(cost: number): string;
99
96
  /**
100
97
  * Token count with optional context-fill % and compaction-count annotations.
101
98
  * Thresholds for percent: <70% dim, 70–85% warning, ≥85% error.
@@ -113,17 +110,13 @@ export declare function formatTurns(turnCount: number, maxTurns?: number | null)
113
110
  export declare function formatMs(ms: number): string;
114
111
  /** Format duration from start/completed timestamps. */
115
112
  export declare function formatDuration(startedAt: number, completedAt?: number): string;
113
+ /** Format an estimated model cost without implying billing precision. */
114
+ export declare function formatCost(cost: number): string;
116
115
  /** Get display name for any agent type (built-in or custom). */
117
116
  export declare function getDisplayName(type: SubagentType): string;
118
117
  /** Short label for prompt mode: "twin" for append, nothing for replace (the default). */
119
118
  export declare function getPromptModeLabel(type: SubagentType): string | undefined;
120
- /**
121
- * Mode label is not included — callers add it where they want it.
122
- *
123
- * Both model forms come back so each surface can pick by width; the
124
- * "(asked X)" annotation is applied here rather than by callers, so a value the
125
- * spawn did not honor cannot be rendered as though it had been (#182).
126
- */
119
+ /** Mode label is not included — callers add it where they want it. */
127
120
  export declare function buildInvocationTags(invocation: AgentInvocation | undefined): {
128
121
  modelName?: string;
129
122
  modelId?: string;
@@ -134,55 +127,43 @@ export declare function describeActivity(activeTools: Map<string, string>, respo
134
127
  export declare class AgentWidget {
135
128
  private manager;
136
129
  private agentActivity;
137
- /**
138
- * Read live at render time. Selects which agents the widget shows — see
139
- * `WidgetMode`. Defaults to `"all"` when a caller supplies no policy; the
140
- * extension supplies one defaulting to `"background"`.
141
- */
130
+ /** Read live at render time. Selects which agents the widget shows. */
142
131
  private mode;
143
132
  private uiCtx;
144
133
  private widgetFrame;
145
134
  private widgetInterval;
146
- /** Tracks how many turns each finished agent has survived. Key: agent ID, Value: turns since finished. */
147
- private finishedTurnAge;
148
- /** How many extra turns errors/aborted agents linger (completed agents clear after 1 turn). */
149
- private static readonly ERROR_LINGER_TURNS;
135
+ private inputUnsub;
136
+ /** Whether arrow keys currently navigate the agent roster. */
137
+ private navigationActive;
138
+ /** Number of modal surfaces currently owning this listener's input suspension. */
139
+ private navigationSuspensionDepth;
140
+ /** Stable identity of the selected row, so roster changes do not jump selection. */
141
+ private selectedAgentId;
142
+ /** Last logical roster index of the selected row, used when it disappears. */
143
+ private selectedRosterIndex;
144
+ /** First logical row currently represented by the bounded viewport. */
145
+ private viewportStart;
146
+ /** Cached records and roster. Rebuilt by update(), never by an arrow press. */
147
+ private cachedAgents;
148
+ private cachedRoster;
149
+ private rosterCacheKey;
150
+ private rosterCacheInitialized;
151
+ /** Terminal history capability is a potentially filesystem-backed lookup. */
152
+ private historyOpenabilityCache;
150
153
  /** Whether the widget callback is currently registered with the TUI. */
151
154
  private widgetRegistered;
152
155
  /** Cached TUI reference from widget factory callback, used for requestRender(). */
153
156
  private tui;
154
157
  /** Last status bar text, used to avoid redundant setStatus calls. */
155
158
  private lastStatusText;
156
- private lastSnapshot;
157
- private inputCleanup;
158
- private navigationSuspended;
159
- private navigationActive;
160
- private selectedAgentId;
161
- private viewportStart;
162
- private selectedRosterIndex;
163
- private openOptions;
164
- private showCost;
165
- private showModel;
159
+ /** Snapshot of the state used for the last widget registration/render request. */
160
+ private lastRenderKey;
161
+ private readonly openOptions;
162
+ private readonly showCost;
163
+ private readonly showModel;
166
164
  constructor(manager: AgentManager, agentActivity: Map<string, AgentActivity>,
167
- /**
168
- * Read live at render time. Selects which agents the widget shows — see
169
- * `WidgetMode`. Defaults to `"all"` when a caller supplies no policy; the
170
- * extension supplies one defaulting to `"background"`.
171
- */
172
- mode?: () => WidgetMode,
173
- /**
174
- * Read live at render time, like `mode`. Whether running agents show an
175
- * estimated cost beside their token count. Defaults to off — the extension
176
- * supplies the user's `showCost` setting.
177
- */
178
- /**
179
- * Read live at render time, like `mode`. Whether running agents name the
180
- * model driving them and the thinking level it is running at. Defaults to
181
- * off — the extension supplies the user's `showModel` setting — because the
182
- * row is already dense and the same pair is on the tool result and in the
183
- * conversation viewer unconditionally.
184
- */
185
- showCostOrOptions?: (() => boolean) | AgentWidgetOptions, showModel?: () => boolean);
165
+ /** Read live at render time. Selects which agents the widget shows. */
166
+ mode?: () => WidgetMode, showCostOrOptions?: (() => boolean) | AgentWidgetOptions, showModel?: () => boolean);
186
167
  /**
187
168
  * Agents eligible for the widget, per the current `WidgetMode`:
188
169
  * - `off`: none (the widget's existing empty-state path hides it entirely).
@@ -194,39 +175,62 @@ export declare class AgentWidget {
194
175
  * only proven-foreground runs drop out — nothing else silently vanishes.
195
176
  * - `all`: every agent.
196
177
  */
178
+ private widgetAgentsFromManager;
179
+ /** Records currently visible to the widget; safe for render and input paths. */
197
180
  private widgetAgents;
198
- /** Temporarily stop global navigation from consuming input handled by another UI surface. */
181
+ private canOpenHistory;
182
+ private historyOpenabilityKey;
183
+ /**
184
+ * Cache terminal history capability by the record state that can affect it.
185
+ * The supplied predicate may call `existsSync`, so it must not run from a
186
+ * timer refresh, render-key calculation, or arrow-navigation path more than
187
+ * once for the same terminal record state.
188
+ */
189
+ private cachedCanOpenHistory;
190
+ /** Refresh the manager snapshot and openability cache at lifecycle/update time. */
191
+ private refreshRoster;
192
+ /** Suspend only this listener's keyboard ownership; never alter the widget. */
199
193
  suspendNavigation(): void;
200
- /** Resume global navigation after another UI surface has closed. */
194
+ /** Restore one layer of this listener's keyboard ownership. */
201
195
  resumeNavigation(): void;
202
196
  /** Set the UI context (grabbed from first tool execution). */
203
197
  setUICtx(ctx: UICtx): boolean;
204
- /**
205
- * Called on each new turn (tool_execution_start).
206
- * Ages finished agents and clears those that have lingered long enough.
207
- */
198
+ /** Request a render on the currently registered TUI without touching input. */
199
+ requestUiRefresh(force?: boolean): boolean;
200
+ /** Called on each new turn (tool_execution_start). */
208
201
  onTurnStart(): void;
209
- /** Ensure the widget update timer is running. */
202
+ /** Keep the spinner/elapsed-time timer alive only while a visible agent runs. */
210
203
  ensureTimer(): void;
211
- /** Check if a finished agent should still be shown in the widget. */
212
- private shouldShowFinished;
213
- /** Record an agent as finished (call when agent completes). */
214
- markFinished(agentId: string): void;
204
+ private syncTimer;
205
+ /**
206
+ * Retained for the lifecycle call sites. Terminal visibility is determined
207
+ * by the manager record and the history capability, not a one-turn timer.
208
+ */
209
+ markFinished(_agentId: string): void;
210
+ /** Retained for lifecycle call sites; terminal rows are record-driven now. */
211
+ markRunning(_agentId: string): void;
215
212
  /**
216
- * Drop an agent's finished-age (call when a settled agent starts running
217
- * again, i.e. a background resume). markFinished only seeds an age it has not
218
- * seen before, so a resumed agent would otherwise keep the age from its
219
- * previous run — already past the linger limit, hiding the new run's
220
- * completion line entirely.
213
+ * Records represented by selectable rows in the above-editor widget.
214
+ *
215
+ * Keep this order as the single source of truth for both rendering and key
216
+ * navigation. `listAgents()` is newest-first; active rows come first so the
217
+ * panel exposes currently useful work before terminal history.
221
218
  */
222
- markRunning(agentId: string): void;
223
- private navigationAgents;
224
- private updateViewport;
219
+ private roster;
220
+ /** True when pi's prompt editor owns the keyboard. */
225
221
  private editorHasFocus;
222
+ private selectedIndexOf;
226
223
  private deactivate;
227
- private handleInput;
228
- private requestUiRefresh;
229
- private selectionBullet;
224
+ /** Resume navigation from the retained row, or select the first row. */
225
+ private activate;
226
+ /** Move the selected row, activating only from an empty focused editor. */
227
+ private moveSelection;
228
+ private openSelected;
229
+ /** Handle terminal input before it reaches the focused prompt editor. */
230
+ handleKey(data: string): {
231
+ consume?: boolean;
232
+ data?: string;
233
+ } | undefined;
230
234
  /** Render a finished agent line. */
231
235
  private renderFinishedLine;
232
236
  /**
@@ -234,7 +238,9 @@ export declare class AgentWidget {
234
238
  * reading live state each time instead of capturing it in a closure.
235
239
  */
236
240
  private renderWidget;
237
- /** Force an immediate widget update. */
241
+ /** Build a render-relevant snapshot without capturing mutable records. */
242
+ private renderKey;
243
+ /** Force an immediate widget update. `advanceSpinner` is reserved for the timer. */
238
244
  update(advanceSpinner?: boolean): void;
239
245
  dispose(): void;
240
246
  }
@@ -1 +1 @@
1
- {"version":3,"file":"agent-widget.d.ts","sourceRoot":"","sources":["../../src/ui/agent-widget.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,KAAK,YAAY,EAAmB,MAAM,qBAAqB,CAAC;AAEzE,OAAO,KAAK,EAAE,eAAe,EAAe,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC1F,OAAO,EAA+D,KAAK,aAAa,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAIhI,0EAA0E;AAC1E,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAEnC,gFAAgF;AAChF,wBAAgB,mBAAmB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAGhE;AAED,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,SAAS,CAAC;AAErD,MAAM,WAAW,kBAAkB;IACjC,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,aAAa,EAAE,WAAW,KAAK,OAAO,CAAC;IACxE,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,aAAa,EAAE,WAAW,EAAE,IAAI,EAAE,mBAAmB,KAAK,IAAI,CAAC;IACxF,QAAQ,CAAC,EAAE,MAAM,OAAO,CAAC;CAC1B;A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