@itookit/dsht 0.3.8 → 0.5.2

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 (166) hide show
  1. package/README.i18n.yaml +2 -2
  2. package/README.md +33 -12
  3. package/README.zh.md +35 -14
  4. package/dist/catalog/controller.d.ts +26 -6
  5. package/dist/catalog/controller.js +73 -45
  6. package/dist/catalog/index.d.ts +1 -0
  7. package/dist/cli/dsht.js +206 -18
  8. package/dist/cli/startup.d.ts +40 -0
  9. package/dist/cli/startup.js +314 -0
  10. package/dist/cli/trace-summary.d.ts +78 -0
  11. package/dist/cli/trace-summary.js +241 -0
  12. package/dist/cli/verifier.d.ts +64 -0
  13. package/dist/cli/verifier.js +265 -0
  14. package/dist/contracts.d.ts +359 -0
  15. package/dist/contracts.js +1 -0
  16. package/dist/controller/commands.d.ts +47 -0
  17. package/dist/controller/commands.js +322 -0
  18. package/dist/controller/connection-streams.d.ts +22 -0
  19. package/dist/controller/connection-streams.js +105 -0
  20. package/dist/controller/connection.d.ts +24 -31
  21. package/dist/controller/connection.js +48 -111
  22. package/dist/controller/controller.d.ts +412 -178
  23. package/dist/controller/controller.js +713 -167
  24. package/dist/controller/foreground.d.ts +44 -0
  25. package/dist/controller/foreground.js +79 -0
  26. package/dist/controller/index.d.ts +8 -1
  27. package/dist/controller/index.js +5 -0
  28. package/dist/controller/loop-contract.d.ts +136 -0
  29. package/dist/controller/loop-contract.js +308 -0
  30. package/dist/controller/loop-coordinator.d.ts +48 -0
  31. package/dist/controller/loop-coordinator.js +647 -0
  32. package/dist/controller/loop-prompts-schema.d.ts +56 -0
  33. package/dist/controller/loop-prompts-schema.js +144 -0
  34. package/dist/controller/loop-prompts.d.ts +55 -0
  35. package/dist/controller/loop-prompts.generated.d.ts +104 -0
  36. package/dist/controller/loop-prompts.generated.js +185 -0
  37. package/dist/controller/loop-prompts.js +104 -0
  38. package/dist/controller/loop-protocols.d.ts +39 -0
  39. package/dist/controller/loop-protocols.js +115 -0
  40. package/dist/controller/loop.d.ts +275 -0
  41. package/dist/controller/loop.js +378 -0
  42. package/dist/controller/prompts.d.ts +54 -0
  43. package/dist/controller/prompts.js +162 -0
  44. package/dist/controller/trace-log.d.ts +45 -0
  45. package/dist/controller/trace-log.js +144 -0
  46. package/dist/controller/verifier.d.ts +130 -0
  47. package/dist/controller/verifier.js +75 -0
  48. package/dist/cost/controller.d.ts +1 -1
  49. package/dist/cost/controller.js +12 -5
  50. package/dist/cost/index.d.ts +1 -1
  51. package/dist/cost/index.js +1 -1
  52. package/dist/cost/ledger.d.ts +0 -1
  53. package/dist/cost/ledger.js +0 -1
  54. package/dist/cost/scanner.js +1 -0
  55. package/dist/json.d.ts +18 -0
  56. package/dist/json.js +19 -0
  57. package/dist/references.d.ts +25 -0
  58. package/dist/references.js +26 -0
  59. package/dist/session/connection-view.d.ts +2 -11
  60. package/dist/session/controller.d.ts +94 -105
  61. package/dist/session/controller.js +262 -536
  62. package/dist/session/history-reader.d.ts +32 -0
  63. package/dist/session/history-reader.js +170 -0
  64. package/dist/session/history.d.ts +6 -18
  65. package/dist/session/history.js +1 -24
  66. package/dist/session/index.d.ts +9 -4
  67. package/dist/session/index.js +7 -3
  68. package/dist/session/info.d.ts +20 -82
  69. package/dist/session/info.js +52 -25
  70. package/dist/session/interactions.d.ts +26 -0
  71. package/dist/session/interactions.js +75 -0
  72. package/dist/session/markdown.js +1 -1
  73. package/dist/session/math.js +1 -1
  74. package/dist/session/mutation-gate.d.ts +51 -0
  75. package/dist/session/mutation-gate.js +73 -0
  76. package/dist/session/navigation.d.ts +2 -89
  77. package/dist/session/navigation.js +2 -129
  78. package/dist/session/navigator.d.ts +47 -0
  79. package/dist/session/navigator.js +158 -0
  80. package/dist/session/peek.d.ts +38 -0
  81. package/dist/session/peek.js +103 -0
  82. package/dist/session/prompt-backfill.d.ts +23 -0
  83. package/dist/session/prompt-backfill.js +88 -0
  84. package/dist/session/references.d.ts +2 -20
  85. package/dist/session/references.js +1 -26
  86. package/dist/session/runtime.d.ts +26 -0
  87. package/dist/session/runtime.js +28 -0
  88. package/dist/session/state.d.ts +20 -0
  89. package/dist/session/state.js +1 -0
  90. package/dist/session/telemetry.d.ts +25 -17
  91. package/dist/session/telemetry.js +66 -60
  92. package/dist/session/transcript.d.ts +5 -7
  93. package/dist/session/transcript.js +2 -15
  94. package/dist/session/types.d.ts +25 -0
  95. package/dist/session/types.js +0 -1
  96. package/dist/session-title.d.ts +9 -0
  97. package/dist/session-title.js +21 -0
  98. package/dist/shell/controller.d.ts +31 -1
  99. package/dist/shell/controller.js +34 -2
  100. package/dist/shell/index.d.ts +3 -3
  101. package/dist/shell/index.js +2 -2
  102. package/dist/shell/runner.d.ts +10 -0
  103. package/dist/shell/runner.js +48 -9
  104. package/dist/slash/index.d.ts +10 -0
  105. package/dist/slash/index.js +7 -0
  106. package/dist/slash/parse.d.ts +42 -0
  107. package/dist/slash/parse.js +259 -0
  108. package/dist/slash/pipeline.d.ts +140 -0
  109. package/dist/slash/pipeline.js +115 -0
  110. package/dist/slash/registry.d.ts +88 -0
  111. package/dist/slash/registry.js +177 -0
  112. package/dist/slash/types.d.ts +126 -0
  113. package/dist/slash/types.js +1 -0
  114. package/dist/state.d.ts +16 -18
  115. package/dist/state.js +4 -3
  116. package/dist/text.d.ts +28 -0
  117. package/dist/text.js +55 -0
  118. package/dist/transport/client.d.ts +4 -3
  119. package/dist/transport/client.js +71 -25
  120. package/dist/transport/events.d.ts +104 -0
  121. package/dist/transport/events.js +149 -0
  122. package/dist/transport/wire.d.ts +9 -17
  123. package/dist/transport/wire.js +2 -27
  124. package/dist/ui/app.js +750 -550
  125. package/dist/ui/chat/header.js +1 -1
  126. package/dist/ui/chat/history-view.d.ts +1 -1
  127. package/dist/ui/chat/loop-status.d.ts +11 -0
  128. package/dist/ui/chat/loop-status.js +28 -0
  129. package/dist/ui/chat/navigation-model.d.ts +86 -0
  130. package/dist/ui/chat/navigation-model.js +107 -0
  131. package/dist/ui/chat/shell-view.d.ts +17 -2
  132. package/dist/ui/chat/shell-view.js +45 -3
  133. package/dist/ui/chat/status.d.ts +47 -3
  134. package/dist/ui/chat/status.js +65 -50
  135. package/dist/ui/chat/use-history-view.d.ts +69 -0
  136. package/dist/ui/chat/use-history-view.js +123 -0
  137. package/dist/ui/chat/viewport.d.ts +1 -1
  138. package/dist/ui/dialogs/cost.d.ts +21 -4
  139. package/dist/ui/dialogs/cost.js +7 -12
  140. package/dist/ui/dialogs/index.d.ts +22 -5
  141. package/dist/ui/dialogs/index.js +19 -3
  142. package/dist/ui/dialogs/loop.d.ts +43 -0
  143. package/dist/ui/dialogs/loop.js +224 -0
  144. package/dist/ui/dialogs/peek.d.ts +25 -0
  145. package/dist/ui/dialogs/peek.js +35 -0
  146. package/dist/ui/dialogs/picker.d.ts +2 -0
  147. package/dist/ui/dialogs/picker.js +4 -2
  148. package/dist/ui/dialogs/use-panels.d.ts +53 -0
  149. package/dist/ui/dialogs/use-panels.js +51 -0
  150. package/dist/ui/input/mouse.d.ts +12 -2
  151. package/dist/ui/input/mouse.js +20 -7
  152. package/dist/ui/input/references.d.ts +1 -1
  153. package/dist/ui/input/use-composer.d.ts +35 -0
  154. package/dist/ui/input/use-composer.js +109 -0
  155. package/dist/ui/input/use-deferred-lines.d.ts +16 -0
  156. package/dist/ui/input/use-deferred-lines.js +54 -0
  157. package/dist/ui/input/use-history-recall.d.ts +20 -0
  158. package/dist/ui/input/use-history-recall.js +47 -0
  159. package/dist/ui/status/model.d.ts +7 -0
  160. package/dist/ui/status/model.js +5 -0
  161. package/dist/ui/theme/index.d.ts +1 -1
  162. package/package.json +6 -4
  163. package/dist/ui/commands/parse.d.ts +0 -104
  164. package/dist/ui/commands/parse.js +0 -135
  165. package/dist/ui/commands/registry.d.ts +0 -33
  166. package/dist/ui/commands/registry.js +0 -73
@@ -1,13 +1,17 @@
1
1
  import type { HostAccess } from '../transport/host.ts';
2
2
  import { type Json, type ObjectValue } from '../transport/wire.ts';
3
- import type { ControllerStore, State } from '../state.ts';
3
+ import type { SessionStore } from './state.ts';
4
+ import { type SessionRender } from './history.ts';
4
5
  import type { HistoryLimits } from './memory.ts';
5
6
  import { type FileReference } from './references.ts';
6
- import { type ComposerState, type InteractionState, type ModelState, type OptionState, type PanelState, type ReferenceState, type ViewState } from './info.ts';
7
+ import type { Telemetry } from './telemetry.ts';
8
+ import { type InteractionState, type OptionState } from './info.ts';
9
+ import type { MutationAdmission } from './mutation-gate.ts';
7
10
  import type { Reasoning } from './history.ts';
8
11
  import { Transcript } from './transcript.ts';
9
12
  import type { ConnectionView } from './connection-view.ts';
10
- import type { HistorySearch, RemovalTarget } from './types.ts';
13
+ import type { HistorySearch, AnswerValue, PendingInteraction, RemovalTarget } from './types.ts';
14
+ import { type ControlFrame, type HostEvent } from '../transport/events.ts';
11
15
  /** Owns the selected session: its follow stream, transcript, history window and interactions. */
12
16
  export declare class SessionController {
13
17
  private readonly store;
@@ -15,45 +19,74 @@ export declare class SessionController {
15
19
  private readonly connection;
16
20
  private readonly historyLimits;
17
21
  private follow;
18
- private interactions;
22
+ private readonly history;
23
+ private readonly interactions;
24
+ private readonly navigation;
25
+ /** Reading protection: reclamation pauses while the reader is away from the live end. */
26
+ private historyPinned;
27
+ /** Host runtime mirrors for every session this connection has seen. */
28
+ private readonly runtime;
19
29
  /** Cancels the background prompt backfill of the previous selection. */
20
- private promptBackfill?;
30
+ private readonly promptBackfill;
21
31
  /** Prompts of sessions this process has already read, so re-opening one costs no page request. */
22
32
  private readonly promptCache;
23
- /** Prompt index, composer and reading view of the selected session; the instance `State.session` exposes. */
33
+ /** Prompt index, record, history window and interaction state of the selected session. */
24
34
  private get info();
25
35
  private get prompts();
26
36
  private stoppingSession?;
27
37
  private interruptTask;
28
38
  private admission;
29
- constructor(store: ControllerStore, host: HostAccess, connection: ConnectionView, historyLimits: HistoryLimits);
39
+ /** Admission order of this session's writes, so two concurrent decisions cannot interleave. */
40
+ private readonly mutations;
41
+ constructor(store: SessionStore, host: HostAccess, connection: ConnectionView, historyLimits: HistoryLimits, report?: (admission: MutationAdmission) => void);
30
42
  /** Host running state covers model generation, tools, and waits between assistant attempts. */
31
43
  get running(): boolean;
32
44
  /** Current title projection, falling back to the list title and then the session ID. */
33
45
  get sessionName(): string | undefined;
34
46
  /** Current agent-preset name, matching the web header's built-in labels and custom metadata. */
35
- get sessionMode(): string | undefined;
47
+ sessionMode(presets?: readonly ObjectValue[]): string | undefined;
36
48
  /** Epoch start from the retained turn log, or when this client first observed the run. */
37
49
  get workingSince(): number | undefined;
38
50
  /** Present only sessions explicitly accounted to the selected workspace. */
39
51
  get visibleSessions(): ObjectValue[];
40
52
  /** Whether a turn, cancellation or prompt admission is still in flight. */
41
53
  get active(): boolean;
54
+ /** @returns The detached history window the reader opened, if any. */
55
+ get window(): Transcript | undefined;
56
+ /** Show a detached history window, releasing the one it replaces.
57
+ * @param window - Record to display, or undefined to return to the live transcript.
58
+ */
59
+ setViewWindow(window?: Transcript): void;
60
+ /** @returns Host projection store of the current generation, owned by this session's runtime. */
61
+ get telemetry(): Telemetry;
62
+ /** Lay out one record for a terminal width.
63
+ *
64
+ * The projection engine stays in this domain; the UI receives plain rows and offsets instead of
65
+ * importing it, and `Reasoning` for committed messages is always the folded default.
66
+ */
67
+ render(input: {
68
+ transcript: Transcript;
69
+ width: number;
70
+ folds: ReadonlySet<number>;
71
+ liveReasoning: Reasoning;
72
+ }): SessionRender;
73
+ /** Apply one normalized control frame to this session's runtime. */
74
+ acceptControl(frame: ControlFrame): void;
42
75
  /** Whether reading protects the loaded window, suspending history reclamation. */
43
76
  get pinned(): boolean;
44
77
  /** Drop generation-scoped state before a new connection generation begins. */
45
78
  beginGeneration(): void;
46
79
  /** Invalidate in-flight work and drop transient interactions when a generation ends. */
47
80
  endGeneration(): void;
48
- /** Wait for an in-flight cancellation so shutdown leaves nothing running. */
81
+ /** Wait for cancellation and foreground history tasks before releasing their records. */
49
82
  settle(): Promise<void>;
50
83
  /** Release the selected transcript and its layout caches. */
51
84
  release(): void;
52
85
  /** Pending interactions for the selected chat session, derived independently of frame order.
53
- * @param state - State being published.
86
+ * @param sessionId - Session whose pending interactions are being published.
54
87
  * @returns Retained question and approval frames for that session.
55
88
  */
56
- pendingFor(state: State): ObjectValue[];
89
+ pendingFor(sessionId: string | undefined): PendingInteraction[];
57
90
  /** Unanswered interactions by session, so a list can show who is waiting without opening them.
58
91
  *
59
92
  * The host delivers approval and question waterfalls for every session on one stream, and this
@@ -63,11 +96,11 @@ export declare class SessionController {
63
96
  * @returns One count per session holding at least one unanswered interaction.
64
97
  */
65
98
  pendingCounts(): ReadonlyMap<string, number>;
66
- /** Retain a recognized host waterfall; unknown events stay with the connection to delegate.
67
- * @param frame - One decoded waterfall frame.
68
- * @returns Whether this domain retained the frame for an answer.
99
+ /** Retain a recognized host interaction; anything else belongs to the connection to delegate.
100
+ * @param event - One normalized host event.
101
+ * @returns Whether this domain retained the event for an answer.
69
102
  */
70
- waterfall(frame: ObjectValue): boolean;
103
+ accept(event: HostEvent): boolean;
71
104
  /** Drop a waterfall the host cancelled.
72
105
  * @param eventId - Correlation id previously retained.
73
106
  */
@@ -79,9 +112,9 @@ export declare class SessionController {
79
112
  status(sessionId: string, running: boolean): void;
80
113
  /** Surface a host-reported error for the selected session.
81
114
  * @param sessionId - Session the host reported on.
82
- * @param error - Error payload as delivered by the host.
115
+ * @param error - Already-normalized error text.
83
116
  */
84
- reportError(sessionId: unknown, error: unknown): void;
117
+ reportError(sessionId: string, error: string): void;
85
118
  /** Stop the selected turn, or allow exit only while idle. Repeated keys share one request.
86
119
  * @param force - Send an explicit cancellation even when the cached running flag is idle.
87
120
  * @returns True when the caller may exit; cancellation failures retain the client.
@@ -96,7 +129,16 @@ export declare class SessionController {
96
129
  /** Refresh both lists from the host, then show the requested picker.
97
130
  * @param screen - Picker to display after the refresh.
98
131
  */
99
- showPicker(screen: 'workspaces' | 'sessions'): Promise<void>;
132
+ showPicker(screen: 'workspaces' | 'sessions', signal?: AbortSignal): Promise<void>;
133
+ /** Refresh navigation data without taking the reader to another screen. */
134
+ refreshLists(): Promise<void>;
135
+ /** Return to the selected conversation without re-selecting it.
136
+ *
137
+ * A picker opened over a conversation is a detour: leaving it must not re-subscribe, reload the
138
+ * transcript or lose the reading position, so this only changes which screen is shown.
139
+ * @returns Whether there was a selected conversation to return to.
140
+ */
141
+ showChat(): boolean;
100
142
  /** Resolve a removal command to one reviewable object without changing the selection.
101
143
  * @param kind - Workspace registration removal or session archival.
102
144
  * @param query - Exact name, ID, or unambiguous ID prefix.
@@ -114,11 +156,11 @@ export declare class SessionController {
114
156
  /** Open a workspace picker, or resolve a workspace by ID, exact title/path, or unique ID prefix.
115
157
  * @param query - Workspace target, if any.
116
158
  */
117
- switchWorkspace(query?: string): Promise<void>;
159
+ switchWorkspace(query?: string, signal?: AbortSignal): Promise<void>;
118
160
  /** Guide workspace selection, list all sessions with `all`, or resolve an exact session target.
119
161
  * @param query - Session target, `all`, or nothing for the guided picker.
120
162
  */
121
- switchSession(query?: string): Promise<void>;
163
+ switchSession(query?: string, signal?: AbortSignal): Promise<void>;
122
164
  /** Prompt for a host path without starting a local agent. */
123
165
  enterPath(): void;
124
166
  /** Adopt the workspace whose registered path contains the directory this client runs in.
@@ -133,13 +175,31 @@ export declare class SessionController {
133
175
  /** Register a host directory and move to its session picker.
134
176
  * @param path - Absolute directory path on the host.
135
177
  */
136
- createWorkspace(path: string): Promise<void>;
178
+ createWorkspace(path: string, signal?: AbortSignal): Promise<void>;
137
179
  /** Create a session only after the user explicitly selects New session. */
138
- createSession(): Promise<void>;
180
+ createSession(signal?: AbortSignal): Promise<void>;
181
+ /** Create a session for another purpose without selecting it, named so a reader can tell it apart.
182
+ *
183
+ * A verifier runs in its own session while the reviewed session stays selected, so this never
184
+ * follows the new session and never touches the reader's transcript.
185
+ * @param title - Session title to apply; hosts without a title service keep the default.
186
+ * @returns The new session's id, or undefined when its identity could not be read.
187
+ */
188
+ createNamedSession(title: string): Promise<string | undefined>;
189
+ /** Stop a session this client owns but has not selected, such as a verifier's.
190
+ *
191
+ * Killing the child client leaves the host's agent generation running, so the turn has to be
192
+ * cancelled on the host itself.
193
+ * @param sessionId - Session whose turn should stop.
194
+ */
195
+ cancelNamedSession(sessionId: string): Promise<void>;
139
196
  /** Replace the selected transcript and cancel its preceding follow stream.
140
197
  * @param sessionId - Session to follow.
141
198
  */
142
199
  selectSession(sessionId: string): Promise<void>;
200
+ /** Reattach the selected conversation after reconnect, keeping the current navigation context. */
201
+ restoreSelectedSession(): void;
202
+ private followSession;
143
203
  /** Wait for the selected follow snapshot, failing on disconnect or cancellation.
144
204
  * @param signal - Cancels waiting without closing the session.
145
205
  */
@@ -186,10 +246,18 @@ export declare class SessionController {
186
246
  * @param text - Composed prompt text.
187
247
  */
188
248
  prompt(text: string): Promise<void>;
249
+ /** Send one prompt the client assembled, keeping its durable echo out of composer recall.
250
+ *
251
+ * The host records every prompt as a user message, so an agent loop that submits a turn per
252
+ * attempt would otherwise crowd out the prompts the operator actually typed. Suppressing the text
253
+ * before sending is what makes the later echo invisible to ↑/↓.
254
+ * @param text - Prompt the client assembled, not text the operator typed.
255
+ */
256
+ promptInternal(text: string): Promise<void>;
189
257
  /** Answer the oldest selected-session interaction, after explicit user action.
190
258
  * @param value - Structured answer value or approval outcome.
191
259
  */
192
- answer(value: Json): Promise<void>;
260
+ answer(value: AnswerValue): Promise<void>;
193
261
  /** Restrict an approval command to an approval request.
194
262
  * @param allowed - Whether the request is approved once.
195
263
  */
@@ -218,40 +286,12 @@ export declare class SessionController {
218
286
  * @returns The recalled prompt, or the unsent draft.
219
287
  */
220
288
  recall(direction: -1 | 1, current: string): string;
221
- /** Composer draft, caret and parked draft, as the selected session holds them. */
222
- get composer(): ComposerState;
223
- /** Replace the composer text and caret, publishing only when either actually changed. */
224
- setComposer(draft: string, cursor?: number): void;
225
- /** Move the caret without changing the text. */
226
- setComposerCursor(cursor: number): void;
227
- /** Move a non-empty draft aside while a dialog owns the keyboard. */
228
- parkComposer(): void;
229
- /** Give a parked draft back once no dialog needs the keyboard. */
230
- restoreComposer(): void;
231
- /** How the selected session's record is being read right now. */
232
- get view(): ViewState;
233
- /** Show a detached history window, releasing the one it replaces.
234
- * @param window - Record to display, or undefined to return to the live transcript.
235
- */
236
- setViewWindow(window?: Transcript): void;
237
- /** Move the reader's position inside the displayed record.
238
- * @param scroll - Rows scrolled back from the live end.
239
- */
240
- setScroll(scroll: number): void;
241
- /** Replace the set of expanded reasoning blocks, keyed by message sequence.
242
- * @param folds - Sequences to expand beyond the default fold.
243
- */
244
- setFolds(folds: ReadonlySet<number>): void;
245
- /** Set the fold mode of the live attempt's completed reasoning.
246
- * @param reasoning - `row` to fold, `full` to keep the streamed text.
247
- */
248
- setLiveReasoning(reasoning: Reasoning): void;
249
289
  /** Local answer state for the selected session's pending waterfalls. */
250
290
  get interaction(): InteractionState;
251
291
  /** Replace the partly collected answers, keyed by the waterfall event id.
252
292
  * @param answers - Answers collected so far, by event id.
253
293
  */
254
- setAnswers(answers: Record<string, ObjectValue[]>): void;
294
+ setAnswers(answers: Record<string, AnswerValue['answers']>): void;
255
295
  /** Replace the pending question's option keyboard state.
256
296
  * @param option - Highlighted option, toggled labels and free-text mode; undefined clears it.
257
297
  */
@@ -260,38 +300,6 @@ export declare class SessionController {
260
300
  * @param approval - Selected approval row; undefined clears the highlight.
261
301
  */
262
302
  setApproval(approval?: InteractionState['approval']): void;
263
- /** Composer-adjacent `@` reference menu state. */
264
- get reference(): ReferenceState;
265
- /** Highlight one row of the open reference menu.
266
- * @param index - Row index into the current matches.
267
- */
268
- setReferenceIndex(index: number): void;
269
- /** Remember the draft that dismissed the reference menu, so it does not reopen while it stands.
270
- * @param draft - Composer text at dismissal, or undefined to allow the menu again.
271
- */
272
- setReferenceDismissed(draft?: string): void;
273
- /** Panels the selected session has open. */
274
- get panels(): PanelState;
275
- /** Show or hide the reasoning panel.
276
- * @param open - Whether `/think` is open.
277
- */
278
- openThoughts(open: boolean): void;
279
- /** Show or hide the pending-input panel.
280
- * @param open - Whether `/queue` is open.
281
- */
282
- openQueue(open: boolean): void;
283
- /** Show the model dialog at one step, or close it.
284
- * @param model - Catalog plus the provider or model being inspected; undefined closes the dialog.
285
- */
286
- setModelPanel(model?: ModelState): void;
287
- /** Show the history or content-search dialog, or close it.
288
- * @param history - Query, content-search mode and matches; undefined closes the dialog.
289
- */
290
- setHistoryPanel(history?: PanelState['history']): void;
291
- /** Show the host session-search results, or close them.
292
- * @param search - Query, results and truncation flag; undefined closes the dialog.
293
- */
294
- setSearchPanel(search?: PanelState['search']): void;
295
303
  /** Remember a locally submitted command, which never becomes a durable session record. */
296
304
  recordRecall(value: string): void;
297
305
  /** Leave recall navigation because the composer was edited or replaced. */
@@ -310,11 +318,6 @@ export declare class SessionController {
310
318
  * @returns Whether any older prompt was recovered.
311
319
  */
312
320
  refillRecall(): boolean;
313
- /** Seed recall from a complete cached entry, so an open that follows a scan costs no request.
314
- * @param sessionId - Session being opened.
315
- * @returns Whether the cache covered this session.
316
- */
317
- private adoptCachedPrompts;
318
321
  /** Fold one history page the cost scan already read into the prompt cache.
319
322
  *
320
323
  * The scan reads every session's whole history on connect, so this is where two readers stop
@@ -327,29 +330,17 @@ export declare class SessionController {
327
330
  * @param sessionId - Session the scan finished.
328
331
  */
329
332
  rememberScanDone(sessionId: string): void;
330
- /** Fold every prompt the host still holds into the recall index, in the background.
331
- *
332
- * Session start delivers only the newest window, so without this the arrows could reach older
333
- * prompts but not show them without paging first. Each page is parsed into a temporary transcript
334
- * and only its prompts are kept, so the live record, its memory window and the row cache never
335
- * grow. The walk is bounded and the next selection cancels it; anything past the bound is still
336
- * reachable through the lazy backward step.
337
- * @param sessionId - Session being opened.
338
- * @param selection - Selector generation that must still be current.
339
- */
340
- private backfillPrompts;
341
333
  /** Search one page at a time, preserving only the first 200 matches and releasing temporary content.
342
334
  * @param query - Literal, case-insensitive text including folded reasoning.
343
335
  * @param signal - Cancels HTTP and processing without cancelling the agent.
344
336
  * @returns Newest-first bounded summaries and an explicit truncation flag.
345
337
  */
346
338
  searchHistory(query: string, signal: AbortSignal): Promise<HistorySearch>;
347
- /** Load a separate small window ending at a search target; the live transcript keeps following.
339
+ /** Select a readable window by sequence; temporary records never escape to the UI.
348
340
  * @param target - Durable message sequence to display.
349
341
  * @param signal - Cancels the target-page request.
350
- * @returns A caller-owned historical window that must be disposed when closed.
351
342
  */
352
- historyAt(target: number, signal: AbortSignal): Promise<Transcript>;
343
+ openHistory(target: number, signal: AbortSignal): Promise<void>;
353
344
  /** Load the prefix required for an explicit history jump; never loop on an unadvancing page.
354
345
  * @param target - Visible record sequence, or first for the oldest available history.
355
346
  * @param signal - Cancels local paging without interrupting the remote agent.
@@ -363,6 +354,4 @@ export declare class SessionController {
363
354
  private releaseTranscript;
364
355
  /** @returns The selected session identity, or a `Select a session first` failure. */
365
356
  private get sessionId();
366
- /** Answer one retained waterfall through the connection's event-result endpoint. */
367
- private reply;
368
357
  }