@robota-sdk/agent-ui-terminal 3.0.0-beta.82 → 3.0.0-beta.83

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 (67) hide show
  1. package/CHANGELOG.md +858 -0
  2. package/README.md +5 -1
  3. package/dist/node/index.d.ts +189 -54
  4. package/dist/node/index.d.ts.map +1 -1
  5. package/dist/node/index.js +21 -21
  6. package/dist/node/index.js.map +1 -1
  7. package/package.json +16 -21
  8. package/src/App.tsx +14 -3
  9. package/src/AppPresentation.tsx +1 -1
  10. package/src/PermissionPrompt.tsx +50 -17
  11. package/src/SessionPicker.tsx +27 -7
  12. package/src/SessionStatusBar.tsx +6 -2
  13. package/src/StatusBar.tsx +24 -0
  14. package/src/SupervisedSessionView.tsx +479 -157
  15. package/src/TuiInteractionChannel.ts +8 -53
  16. package/src/__tests__/SupervisedSessionView-render.test.tsx +28 -0
  17. package/src/__tests__/SupervisedSessionView.test.tsx +453 -82
  18. package/src/__tests__/TuiInteractionChannel.display-contract.test.ts +32 -22
  19. package/src/__tests__/TuiInteractionChannel.lifecycle.test.ts +10 -2
  20. package/src/__tests__/attached-app-session-switch.test.tsx +317 -0
  21. package/src/__tests__/checkpoint-store-per-channel.test.ts +81 -0
  22. package/src/__tests__/command-handoff-pty-e2e.test.ts +2 -2
  23. package/src/__tests__/default-tui-cli-adapter-host-settings.test.ts +3 -1
  24. package/src/__tests__/fixtures/command-handoff-driver.tsx +8 -5
  25. package/src/__tests__/grant-history-reaches-the-session.test.ts +31 -0
  26. package/src/__tests__/numbered-selection-chunk.test.tsx +41 -0
  27. package/src/__tests__/palette-consistency.test.ts +0 -1
  28. package/src/__tests__/permission-prompt-arming.test.tsx +153 -0
  29. package/src/__tests__/pty/screen-005-prompt-footers.ptytest.ts +2 -1
  30. package/src/__tests__/pty/screen-006-no-color.ptytest.ts +2 -0
  31. package/src/__tests__/pty/session-attach.ptytest.ts +144 -0
  32. package/src/__tests__/render-channel-options.test.ts +6 -6
  33. package/src/__tests__/sandbox-reaches-the-session.test.ts +37 -0
  34. package/src/__tests__/screen-reader-menus.test.tsx +1 -1
  35. package/src/__tests__/session-picker.test.tsx +93 -0
  36. package/src/__tests__/status-bar.test.tsx +8 -0
  37. package/src/__tests__/tui-channel-init-failure.test.ts +10 -2
  38. package/src/__tests__/wire-tui-channel.test.ts +1445 -0
  39. package/src/__tests__/wire-tui-client-commands.test.ts +243 -0
  40. package/src/app-view-model.ts +6 -2
  41. package/src/attached-session-connection.ts +14 -0
  42. package/src/hooks/__tests__/use-app-detach-key.test.tsx +72 -0
  43. package/src/hooks/__tests__/use-app-loop-escape.test.tsx +13 -0
  44. package/src/hooks/useAppController.ts +6 -2
  45. package/src/hooks/useAppInputBindings.ts +20 -2
  46. package/src/hooks/useAppInteractionState.ts +3 -0
  47. package/src/hooks/useAppOverlays.ts +20 -4
  48. package/src/hooks/useNumberedSelection.ts +19 -2
  49. package/src/hooks/useTuiChannel.ts +13 -1
  50. package/src/index.ts +17 -3
  51. package/src/render.tsx +218 -27
  52. package/src/short-session-id.ts +9 -0
  53. package/src/slash-command-input.ts +11 -0
  54. package/src/tui-app-channel-port.ts +29 -1
  55. package/src/tui-channel-options.ts +11 -2
  56. package/src/tui-session-event-projector.ts +0 -2
  57. package/src/tui-session-events.ts +6 -0
  58. package/src/tui-session-options.ts +9 -0
  59. package/src/tui-state-manager.ts +17 -3
  60. package/src/waiting-loop-stop-notice.ts +23 -0
  61. package/src/wire-history-sync.ts +159 -0
  62. package/src/wire-tui-channel.ts +962 -0
  63. package/src/wire-tui-client-commands.ts +142 -0
  64. package/src/wire-tui-projection.ts +136 -0
  65. package/dist/node/index.cjs +0 -32
  66. package/dist/node/index.d.cts +0 -1066
  67. package/dist/node/index.d.cts.map +0 -1
package/README.md CHANGED
@@ -10,7 +10,8 @@ does not reverse the already-committed session operation.
10
10
 
11
11
  `IRenderOptions.projectAccess` carries the host's trusted-or-restricted project decision through
12
12
  `renderApp` into `TuiInteractionChannel`. `cwd` alone never enables project discovery; omission is
13
- Restricted. Checkpoint mutation is separately opt-in through `editCheckpointStore`.
13
+ Restricted. Checkpoint mutation is separately opt-in through `createEditCheckpointStore`, which
14
+ builds each session its own store.
14
15
 
15
16
  The status bar projects the session's active model-effort level next to the provider/model when the
16
17
  session exposes it. This is a read-only view of session state and remains separate from thinking
@@ -20,6 +21,9 @@ display settings.
20
21
  import { renderApp, createDefaultTuiCliAdapter } from '@robota-sdk/agent-ui-terminal';
21
22
  ```
22
23
 
24
+ The package is ESM-only: use `import` or `import()`. It has no `require()` entry, because Ink loads
25
+ `yoga-layout`, which starts with a top-level `await` that `require()` cannot run.
26
+
23
27
  See [docs/SPEC.md](./docs/SPEC.md) for the full contract.
24
28
 
25
29
  PTY test support is internal to `src/__tests__/pty/`; the former private `agent-testing`
@@ -1,9 +1,10 @@
1
1
  import React from "react";
2
- import { CommandRegistry, EditCheckpointStore, IAgentDefinition, IAutomaticMemoryConfig, IBackgroundTaskRunner, ICommandHostAdapters, ICommandModule, IContributionSource, ICreateSessionOptions, ILivePromptTracePort, IMemoryStore, INodeHostSettingsSource, IOrgPolicy, IOutputStylePrompt, IPerTurnRecallConfig, IProjectSettingsPath, IPromptHistoryOptions, IProviderErrorGuidance, IRemoteCommandPolicy, ISkillRootDescriptor, IToolCallHandoffPolicy, InteractiveSession, TSettingsSource, TShellExecFn, TSubagentRunnerFactory, TWorkspaceProjectAccess } from "@robota-sdk/agent-framework";
2
+ import { CommandRegistry, EditCheckpointStore, IAgentDefinition, IAutomaticMemoryConfig, IBackgroundTaskRunner, ICommandHostAdapters, ICommandHostTerminalHandoff, ICommandHostWorkspace, ICommandModule, IContributionSource, ICreateSessionOptions, ILivePromptTracePort, IMemoryStore, INodeHostSettingsSource, IOrgPolicy, IOutputStylePrompt, IPerTurnRecallConfig, IProjectSettingsPath, IPromptHistoryOptions, IProviderErrorGuidance, IRemoteCommandPolicy, ISkillRootDescriptor, IToolCallHandoffPolicy, InteractiveSession, TInteractiveSessionOptions, TSettingsSource, TShellExecFn, TSubagentRunnerFactory, TWorkspaceProjectAccess } from "@robota-sdk/agent-framework";
3
3
  import { IAIProvider, IActionRequest, IContextWindowState, IHistoryEntry, IProviderDefinition, IToolWithEventService, TActionResponse, TModelEffortSelection, TPermissionMode, TSessionEndReason, TToolArgs, TUniversalValue } from "@robota-sdk/agent-core";
4
- import { IBranchEvent, ICommandInfo, IContextFileRefreshedEvent, IExecutionResult, IInteractiveSession, IInteractiveSessionEvents, IInteractiveSessionStore, IPlanApprovalEvent, IPromptHistorySource, ITerminalHandoff, IToolState, TInteractiveEventName, TPermissionResultValue } from "@robota-sdk/agent-interface-session";
4
+ import { IBranchEvent, ICommandInfo, IContextFileRefreshedEvent, IExecutionResult, IInteractiveSession, IInteractiveSessionEvents, IInteractiveSessionStore, IPlanApprovalEvent, IPromptHistorySource, ISessionListingEntry, ITerminalHandoff, IToolState, TInteractiveEventName, TPermissionResultValue } from "@robota-sdk/agent-interface-session";
5
+ import { TClientMessage, TServerMessage } from "@robota-sdk/agent-transport/client";
5
6
  import { IExecutionDetailPage, IExecutionWorkspaceSnapshot } from "@robota-sdk/agent-interface-execution";
6
- import { ICommand, IThemeAppearanceState, IThemeCataloguePort, TReducedMotionOverride } from "@robota-sdk/agent-interface-command";
7
+ import { ICommand, ICommandResult, IThemeAppearanceState, IThemeCataloguePort, TAppearanceSettingsPatch, TReducedMotionOverride } from "@robota-sdk/agent-interface-command";
7
8
  import { ITransportRegistryView } from "@robota-sdk/agent-interface-transport";
8
9
  import { ITuiCommandInteraction, ITuiConfirmInteraction, ITuiPickerInteraction, ITuiPickerItem, TAnyTuiCommandInteraction, TOnMissingArgsAction } from "@robota-sdk/agent-interface-tui";
9
10
  //#region src/screen-reader-pacing.d.ts
@@ -26,6 +27,45 @@ interface ITerminalCapabilityOverrides {
26
27
  readonly turnMarks?: boolean | undefined;
27
28
  }
28
29
  //#endregion
30
+ //#region src/terminal-handoff-controller.d.ts
31
+ /** How the App suspends/resumes its rendering, registered into the controller on mount. */
32
+ interface ITuiSuspendHooks {
33
+ /** Render nothing (release Ink input/raw mode); resolves once that has committed. */
34
+ suspend(): Promise<void>;
35
+ /** Resume rendering and force a redraw. */
36
+ resume(): void;
37
+ }
38
+ /**
39
+ * SCREEN-1992: terminal modes the TUI negotiated (focus reporting) are released before a child owns
40
+ * the terminal and re-negotiated once it is reclaimed, so the child never receives `CSI I`/`CSI O`
41
+ * and a child that reset the mode does not leave the TUI blind afterwards.
42
+ */
43
+ interface ITerminalModeHooks {
44
+ /** May be async: SCREEN-2670 drains the parked screen-reader output before the child gets the TTY. */
45
+ preSuspend(): void | Promise<void>;
46
+ postResume(): void;
47
+ }
48
+ /** Minimal slice of the Ink render instance the controller needs. */
49
+ interface IInkClearable {
50
+ clear(): void;
51
+ }
52
+ declare class TerminalHandoffController implements ITerminalHandoff {
53
+ private hooks?;
54
+ private instance?;
55
+ private modeHooks?;
56
+ /**
57
+ * The App registers how to suspend/resume Ink. Returns an unregister function for cleanup on
58
+ * unmount. Only a mounted App provides these hooks, which gates `canHandoffTerminal`.
59
+ */
60
+ registerSuspendHooks(hooks: ITuiSuspendHooks): () => void;
61
+ /** render.tsx registers the terminal-mode bracket (SCREEN-1992) before `render()`. */
62
+ setTerminalModeHooks(hooks: ITerminalModeHooks | undefined): void;
63
+ /** render.tsx supplies the Ink instance (for `clear()`) after `render()` returns. */
64
+ setInkInstance(instance: IInkClearable): void;
65
+ get canHandoffTerminal(): boolean;
66
+ runWithTerminal<T>(fn: () => Promise<T>): Promise<T>;
67
+ }
68
+ //#endregion
29
69
  //#region src/tui-session-events.d.ts
30
70
  interface ITuiSessionEventNotice {
31
71
  id: string;
@@ -90,7 +130,7 @@ declare class TuiStateManager {
90
130
  onToolStart: (state: IToolState) => void;
91
131
  onToolEnd: (state: IToolState) => void;
92
132
  onThinking: (thinking: boolean) => void;
93
- onComplete: (result: IExecutionResult) => void;
133
+ onComplete: (result: Pick<IExecutionResult, "contextState">) => void;
94
134
  onInterrupted: () => void;
95
135
  onError: (error?: Error) => void;
96
136
  onContextUpdate: (state: IContextWindowState) => void;
@@ -100,6 +140,13 @@ declare class TuiStateManager {
100
140
  * only the newly-appended tail; committed lines already in terminal scrollback are never re-printed.
101
141
  */
102
142
  syncHistory(entries: IHistoryEntry[]): void;
143
+ /**
144
+ * A host's history as a terminal attached to it last read it, then the echoes of prompts the host
145
+ * has not recorded yet. Unlike `syncHistory`, an empty history is an answer: the host's session
146
+ * has no entries.
147
+ */
148
+ syncHostHistory(entries: readonly IHistoryEntry[], echoes: readonly IHistoryEntry[]): void;
149
+ private withLocalNotices;
103
150
  /** Add a notice this terminal owns; it survives the next session-history sync in place. */
104
151
  addEntry(entry: IHistoryEntry): void;
105
152
  /** Echo the user's prompt at once; the session's own user entry replaces it on the next sync. */
@@ -124,45 +171,6 @@ declare class TuiStateManager {
124
171
  dispose(): void;
125
172
  }
126
173
  //#endregion
127
- //#region src/terminal-handoff-controller.d.ts
128
- /** How the App suspends/resumes its rendering, registered into the controller on mount. */
129
- interface ITuiSuspendHooks {
130
- /** Render nothing (release Ink input/raw mode); resolves once that has committed. */
131
- suspend(): Promise<void>;
132
- /** Resume rendering and force a redraw. */
133
- resume(): void;
134
- }
135
- /**
136
- * SCREEN-1992: terminal modes the TUI negotiated (focus reporting) are released before a child owns
137
- * the terminal and re-negotiated once it is reclaimed, so the child never receives `CSI I`/`CSI O`
138
- * and a child that reset the mode does not leave the TUI blind afterwards.
139
- */
140
- interface ITerminalModeHooks {
141
- /** May be async: SCREEN-2670 drains the parked screen-reader output before the child gets the TTY. */
142
- preSuspend(): void | Promise<void>;
143
- postResume(): void;
144
- }
145
- /** Minimal slice of the Ink render instance the controller needs. */
146
- interface IInkClearable {
147
- clear(): void;
148
- }
149
- declare class TerminalHandoffController implements ITerminalHandoff {
150
- private hooks?;
151
- private instance?;
152
- private modeHooks?;
153
- /**
154
- * The App registers how to suspend/resume Ink. Returns an unregister function for cleanup on
155
- * unmount. Only a mounted App provides these hooks, which gates `canHandoffTerminal`.
156
- */
157
- registerSuspendHooks(hooks: ITuiSuspendHooks): () => void;
158
- /** render.tsx registers the terminal-mode bracket (SCREEN-1992) before `render()`. */
159
- setTerminalModeHooks(hooks: ITerminalModeHooks | undefined): void;
160
- /** render.tsx supplies the Ink instance (for `clear()`) after `render()` returns. */
161
- setInkInstance(instance: IInkClearable): void;
162
- get canHandoffTerminal(): boolean;
163
- runWithTerminal<T>(fn: () => Promise<T>): Promise<T>;
164
- }
165
- //#endregion
166
174
  //#region src/types.d.ts
167
175
  /**
168
176
  * Permission result: true (allow once), false (deny), 'allow-session' (remember for session),
@@ -193,6 +201,8 @@ interface ITuiRuntimeStatusSnapshot {
193
201
  sessionId: string;
194
202
  activePresetId?: string;
195
203
  effort?: TModelEffortSelection;
204
+ /** The model the session reports, when its host says; absent ⇒ the one this terminal was started with. */
205
+ modelId?: string;
196
206
  }
197
207
  interface ITuiChannelSnapshot {
198
208
  history: readonly IHistoryEntry[];
@@ -215,6 +225,28 @@ interface ITuiChannelSnapshot {
215
225
  usedTokens: number;
216
226
  maxTokens: number;
217
227
  };
228
+ /**
229
+ * The sessions the session picker offers, when the host keeps them (a terminal attached to a
230
+ * daemon). Absent ⇒ the picker lists this terminal's own session store. A host that keeps sessions
231
+ * live says which rows run now and how many clients are on each; the picker shows both.
232
+ */
233
+ hostSessions?: readonly ISessionListingEntry[];
234
+ /**
235
+ * Changes when the transcript starts over for another session while the App keeps this channel.
236
+ * The terminal prints the transcript once and counts what it printed, so a new transcript is
237
+ * printed from its start. Absent ⇒ the transcript never starts over under this channel.
238
+ */
239
+ transcriptGeneration?: number;
240
+ /**
241
+ * True while this terminal only observes the session: it sends nothing that changes it, and the
242
+ * App offers no key that would. Absent ⇒ the terminal drives the session.
243
+ */
244
+ readOnly?: boolean;
245
+ /**
246
+ * True when this terminal is attached to a session a host runs: leaving only detaches it, and
247
+ * Ctrl-] leaves too. Absent ⇒ the terminal runs its own session, where Ctrl-] means nothing.
248
+ */
249
+ attached?: boolean;
218
250
  }
219
251
  /**
220
252
  * Complete channel surface visible below the top-level App composition shell.
@@ -309,8 +341,15 @@ interface ITuiInteractionChannelOptions {
309
341
  contributionSources?: ICreateSessionOptions['contributionSources'];
310
342
  skillRoots?: ICreateSessionOptions['skillRoots'];
311
343
  userSettingsSources?: readonly INodeHostSettingsSource[];
312
- /** Explicit authority- and permission-backed edit checkpoint capability. */
344
+ /**
345
+ * Explicit authority- and permission-backed edit checkpoint capability for this channel's one
346
+ * session. Never shared with another channel's session: a store holds one turn in progress.
347
+ */
313
348
  editCheckpointStore?: EditCheckpointStore;
349
+ /** The host's way to build each external-event grant's verifier; absent, no grant opens. */
350
+ externalEventVerifierFactory?: TInteractiveSessionOptions['externalEventVerifierFactory'];
351
+ /** The run's grant history, shared by every session this TUI binds (#3189). */
352
+ externalEventGrantHistory?: TInteractiveSessionOptions['externalEventGrantHistory'];
314
353
  /**
315
354
  * CLI-076: the resolved model id (the same value the status line displays). Forwarded to the session so an
316
355
  * explicit `--model` override reaches the provider chat call instead of being silently replaced by the
@@ -336,7 +375,6 @@ interface ITuiInteractionChannelOptions {
336
375
  /** Issue #3081: this channel's session is the target of a `/cd` from this directory. */
337
376
  workspaceMovedFrom?: string;
338
377
  sessionName?: string;
339
- onAutoNamed?: (name: string) => void;
340
378
  backgroundTaskRunners?: IBackgroundTaskRunner[];
341
379
  /** MCP-004: forwarded to `ICreateSessionOptions.toolCallHandoff`. */
342
380
  toolCallHandoff?: IToolCallHandoffPolicy;
@@ -355,6 +393,8 @@ interface ITuiInteractionChannelOptions {
355
393
  */
356
394
  additionalTools?: IToolWithEventService[];
357
395
  defaultTools?: readonly IToolWithEventService[];
396
+ /** The sandbox the shell tools run under, so the session can let a confined command skip the prompt. */
397
+ sandboxClient?: ICreateSessionOptions['sandboxClient'];
358
398
  commandModules?: readonly ICommandModule[];
359
399
  commandHostAdapters?: ICommandHostAdapters;
360
400
  shellExec?: TShellExecFn;
@@ -419,7 +459,6 @@ declare class TuiInteractionChannel implements ITuiAppChannelPort {
419
459
  private readonly lifecycle;
420
460
  availableCommands: ICommandInfo[];
421
461
  sessionName: string | undefined;
422
- private autoNameTriggered;
423
462
  private initPoller;
424
463
  /** TERM-002: the App registers its Ink suspend/resume hooks into this controller. */
425
464
  get terminalHandoffController(): TerminalHandoffController | undefined;
@@ -456,6 +495,7 @@ declare class TuiInteractionChannel implements ITuiAppChannelPort {
456
495
  addEntry(entry: IHistoryEntry): void;
457
496
  abort(): void;
458
497
  cancelQueue(): void;
498
+ /** Esc on an idle prompt: the session decides which waiting loop, if any, stops. */
459
499
  stopWaitingSelfPacedLoop(): Promise<void>;
460
500
  shutdown(options?: {
461
501
  reason?: TSessionEndReason;
@@ -490,7 +530,6 @@ declare class TuiInteractionChannel implements ITuiAppChannelPort {
490
530
  * permission promise dangling (the tool would hang) nor silently grant it (CLI-075 RUNTIME-32).
491
531
  */
492
532
  private cancelAllPermissions;
493
- private handleAutoNaming;
494
533
  private syncRestoredHistory;
495
534
  private startInitCheck;
496
535
  /** Throws while the session is not ready; the init poller classifies the error. */
@@ -502,6 +541,19 @@ declare class TuiInteractionChannel implements ITuiAppChannelPort {
502
541
  private syncExecutionWorkspace;
503
542
  }
504
543
  //#endregion
544
+ //#region src/attached-session-connection.d.ts
545
+ /**
546
+ * A terminal's end of the session protocol to a session it is attached to. The terminal only sends
547
+ * and listens; closing the connection belongs to whoever opened it.
548
+ */
549
+ interface IAttachedSessionConnection {
550
+ send(message: TClientMessage): void;
551
+ subscribe(listener: (message: TServerMessage) => void): () => void;
552
+ onClose(listener: () => void): () => void;
553
+ }
554
+ /** Why an attached terminal stopped showing the session: the user left, or the connection closed. */
555
+ type TAttachedSessionEnd = 'user' | 'closed';
556
+ //#endregion
505
557
  //#region src/keybindings/keybinding-catalogue.d.ts
506
558
  declare const KEYBINDING_ACTIONS: {
507
559
  readonly app: readonly ["open-workspace-switcher"];
@@ -787,6 +839,25 @@ interface ITuiCliAdapter {
787
839
  formatResumeCommand?: (sessionId: string) => string;
788
840
  }
789
841
  //#endregion
842
+ //#region src/wire-tui-client-commands.d.ts
843
+ /** What a client-run command may use: this terminal's handoff and working directory. */
844
+ type TTuiClientCommandHost = ICommandHostTerminalHandoff & ICommandHostWorkspace;
845
+ /**
846
+ * A command this terminal runs itself. Declared here rather than imported: the command package's
847
+ * `createTerminalClientCommands` produces objects of this shape, and this package does not depend on
848
+ * the command package.
849
+ */
850
+ interface ITuiClientCommand {
851
+ readonly name: string;
852
+ execute(host: TTuiClientCommandHost, args: string): ICommandResult | Promise<ICommandResult>;
853
+ }
854
+ /** The client-run commands, and how this terminal writes what they change. */
855
+ interface ITuiClientCommands {
856
+ readonly commands: readonly ITuiClientCommand[];
857
+ /** Writes the appearance keys of the user's settings; resolves when written. */
858
+ writeAppearanceSettings(patch: TAppearanceSettingsPatch): void | Promise<void>;
859
+ }
860
+ //#endregion
790
861
  //#region src/render.d.ts
791
862
  interface IRenderOptions {
792
863
  cwd: string;
@@ -826,8 +897,19 @@ interface IRenderOptions {
826
897
  * is what disabled the one check that would have caught the missing declaration.
827
898
  */
828
899
  orgPolicy?: IOrgPolicy | undefined;
829
- /** Explicit authority- and permission-backed edit checkpoint capability. */
830
- editCheckpointStore?: EditCheckpointStore;
900
+ /**
901
+ * Builds the authority- and permission-backed edit checkpoint store for one session; absent, no
902
+ * session keeps checkpoints. A factory, not a store: a session switch builds the next channel
903
+ * while the old session may still be finishing a turn, and a store holds one turn in progress.
904
+ */
905
+ createEditCheckpointStore?: () => EditCheckpointStore;
906
+ /** The host's way to build each external-event grant's verifier; absent, no grant opens. */
907
+ externalEventVerifierFactory?: TInteractiveSessionOptions['externalEventVerifierFactory'];
908
+ /**
909
+ * #3189: the run's grant history, handed to every session this TUI builds so a switch replays no
910
+ * spent token and resets no rate. DECLARED for the reason `orgPolicy` above is.
911
+ */
912
+ externalEventGrantHistory?: TInteractiveSessionOptions['externalEventGrantHistory'];
831
913
  providerOverride?: string | undefined;
832
914
  /**
833
915
  * #1844: forwarded to the session so `/provider switch` can construct the provider it switches TO.
@@ -890,6 +972,8 @@ interface IRenderOptions {
890
972
  */
891
973
  additionalTools?: IToolWithEventService[];
892
974
  defaultTools?: readonly IToolWithEventService[];
975
+ /** The sandbox the shell tools run under, so the session can let a confined command skip the prompt. */
976
+ sandboxClient?: ICreateSessionOptions['sandboxClient'];
893
977
  commandModules?: readonly ICommandModule[];
894
978
  commandHostAdapters?: ICommandHostAdapters;
895
979
  shellExec?: TShellExecFn;
@@ -965,6 +1049,33 @@ interface IRenderOptions {
965
1049
  promptHistoryProject?: string;
966
1050
  }
967
1051
  declare function renderApp(options: IRenderOptions): Promise<void>;
1052
+ /**
1053
+ * What the full TUI needs to attach to a session a host runs (a daemon) instead of building one.
1054
+ * Only presentation options: everything else belongs to the host's session.
1055
+ */
1056
+ interface IRenderAttachedAppOptions extends Pick<IRenderOptions, 'cwd' | 'productDisplayName' | 'version' | 'cliAdapter' | 'screenReader' | 'screenReaderChannel' | 'screenReaderHint' | 'screenReaderPacing' | 'terminalCapabilities' | 'keybindingsSource' | 'themeRegistry' | 'reducedMotion' | 'reducedMotionOverride' | 'focusReporting' | 'promptHistorySource' | 'promptHistoryProject'> {
1057
+ /** The session protocol connection; closing it belongs to the caller. */
1058
+ readonly connection: IAttachedSessionConnection;
1059
+ /** Shown as the session's label until the session reports its own name. */
1060
+ readonly sessionLabel: string;
1061
+ /** This terminal's driver id, from the attach handshake. */
1062
+ readonly driverId: string;
1063
+ /** Commands this terminal runs itself (`/shell`, `/theme`, ...); the host never sees them. */
1064
+ readonly clientCommands?: ITuiClientCommands;
1065
+ /**
1066
+ * How this terminal is on the session: `'drive'` (the default) sends prompts and answers questions;
1067
+ * `'observe'` only watches, and the host refuses anything else from it.
1068
+ */
1069
+ readonly mode?: 'drive' | 'observe';
1070
+ /** Print the screen-reader line; false when this process already printed it. Default true. */
1071
+ readonly announce?: boolean;
1072
+ }
1073
+ /**
1074
+ * Render the full TUI on a session the terminal is attached to over the session protocol. Leaving
1075
+ * only detaches: the session keeps running. Resolves `'user'` when the user leaves (`/exit`,
1076
+ * Ctrl-C) and `'closed'` when the connection closed.
1077
+ */
1078
+ declare function renderAttachedApp(options: IRenderAttachedAppOptions): Promise<TAttachedSessionEnd>;
968
1079
  //#endregion
969
1080
  //#region src/SupervisedSessionView.d.ts
970
1081
  interface ISupervisedViewRow {
@@ -982,25 +1093,49 @@ interface ISupervisedViewRow {
982
1093
  readonly kind: 'pull' | 'merge-request';
983
1094
  };
984
1095
  readonly problem?: 'invalid-registration';
1096
+ /** The verified registration generation; a row without one never offers an action. Never rendered. */
1097
+ readonly generation?: string;
1098
+ }
1099
+ /** An attach the user confirmed in the view, bound to the process start the row showed. */
1100
+ interface ISupervisedAttachRequest {
1101
+ readonly id: string;
1102
+ readonly generation: string;
1103
+ readonly mode: 'drive' | 'observe';
1104
+ /** How the view was grouped, so it can reopen the same way after the attach. */
1105
+ readonly groupByDirectory: boolean;
985
1106
  }
1107
+ /** How the view ended: closed, or handed to the host to attach and then come back. */
1108
+ type TSupervisedViewExit = {
1109
+ readonly kind: 'closed';
1110
+ } | ({
1111
+ readonly kind: 'attach';
1112
+ } & ISupervisedAttachRequest);
986
1113
  interface ISupervisedSessionViewProps {
987
1114
  readonly loadRows: (signal: AbortSignal) => Promise<readonly ISupervisedViewRow[]>;
988
- readonly onStop?: (id: string) => Promise<void>;
1115
+ /** Called once the user confirmed; the view then closes so the host can attach this terminal. */
1116
+ readonly onAttach?: (request: ISupervisedAttachRequest) => void;
1117
+ /** Receives the generation the row displayed, so a session restarted under the same id is refused. */
1118
+ readonly onStop?: (id: string, generation: string) => Promise<void>;
989
1119
  readonly onStart?: () => Promise<string>;
990
- readonly onOpenPr?: (id: string, url: string) => Promise<void>;
1120
+ readonly onOpenPr?: (id: string, url: string, generation: string) => Promise<void>;
991
1121
  readonly filteredByCwd?: boolean;
992
1122
  readonly filteredByName?: boolean;
993
1123
  readonly filteredByPr?: boolean;
994
1124
  readonly stateFilter?: TGroup;
995
1125
  readonly refreshMs?: number;
1126
+ /** The row to select first, when it is still listed — the one an attach left from. */
1127
+ readonly initialSelectedId?: string;
1128
+ readonly initialGroupByDirectory?: boolean;
996
1129
  }
997
1130
  declare const GROUP_ORDER: readonly ["needs-input", "working", "idle", "unknown", "unverified", "dead"];
998
- type TGroup = typeof GROUP_ORDER[number];
1131
+ type TGroup = (typeof GROUP_ORDER)[number];
999
1132
  declare function renderSupervisedSessionView(options: ISupervisedSessionViewProps & {
1000
1133
  readonly screenReader: boolean;
1001
1134
  readonly screenReaderChannel?: TScreenReaderChannel;
1002
1135
  readonly screenReaderHint?: boolean;
1003
- }): Promise<void>;
1136
+ /** Print the screen-reader line; false when this process already printed it. */
1137
+ readonly announce?: boolean;
1138
+ }): Promise<TSupervisedViewExit>;
1004
1139
  //#endregion
1005
1140
  //#region src/create-default-tui-cli-adapter.d.ts
1006
1141
  interface IDefaultTuiCliAdapterOptions {
@@ -1062,5 +1197,5 @@ declare function sanitizeThemeProse(message: string): string;
1062
1197
  */
1063
1198
  declare function parseThemeDocument(input: IThemeDocumentInput): TThemeDocumentResult;
1064
1199
  //#endregion
1065
- export { type IDefaultTuiCliAdapterOptions, type IKeybindingDiagnostic, type IKeybindingSnapshot, type IKeybindingWarning, type IKeybindingsFilePort, type IKeybindingsSource, type INodeKeybindingsSourceOptions, type IRenderOptions, type IScreenReaderPacingOverrides, type ISupervisedSessionViewProps, type ISupervisedViewRow, type ITerminalCapabilityOverrides, type IThemeCataloguePortOptions, type IThemeDocumentInput, type IThemeRegistry, type IThemeResolution, type IThemeSkip, type ITuiCliAdapter, type ITuiCommandInteraction, type ITuiConfirmInteraction, type ITuiInteractionChannelOptions, type ITuiPickerInteraction, type ITuiPickerItem, type ITuiTheme, type TAnyTuiCommandInteraction, type TKeybindingAction, type TKeybindingContext, type TOnMissingArgsAction, type TScreenReaderChannel, type TThemeDocumentResult, type TThemeSource, TuiInteractionChannel, createDefaultTuiCliAdapter, createNodeKeybindingsSource, createThemeCataloguePort, createThemeRegistry, escapeThemeText, listBuiltInThemes, parseThemeDocument, quoteThemeText, renderApp, renderSupervisedSessionView, sanitizeThemeProse };
1200
+ export { type IAttachedSessionConnection, type IDefaultTuiCliAdapterOptions, type IKeybindingDiagnostic, type IKeybindingSnapshot, type IKeybindingWarning, type IKeybindingsFilePort, type IKeybindingsSource, type INodeKeybindingsSourceOptions, type IRenderAttachedAppOptions, type IRenderOptions, type IScreenReaderPacingOverrides, type ISupervisedAttachRequest, type ISupervisedSessionViewProps, type ISupervisedViewRow, type ITerminalCapabilityOverrides, type IThemeCataloguePortOptions, type IThemeDocumentInput, type IThemeRegistry, type IThemeResolution, type IThemeSkip, type ITuiCliAdapter, type ITuiClientCommand, type ITuiClientCommands, type ITuiCommandInteraction, type ITuiConfirmInteraction, type ITuiInteractionChannelOptions, type ITuiPickerInteraction, type ITuiPickerItem, type ITuiTheme, type TAnyTuiCommandInteraction, type TAttachedSessionEnd, type TKeybindingAction, type TKeybindingContext, type TOnMissingArgsAction, type TScreenReaderChannel, type TSupervisedViewExit, type TThemeDocumentResult, type TThemeSource, type TTuiClientCommandHost, TuiInteractionChannel, createDefaultTuiCliAdapter, createNodeKeybindingsSource, createThemeCataloguePort, createThemeRegistry, escapeThemeText, listBuiltInThemes, parseThemeDocument, quoteThemeText, renderApp, renderAttachedApp, renderSupervisedSessionView, sanitizeThemeProse };
1066
1201
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/screen-reader-pacing.ts","../../src/terminal-capabilities-context.tsx","../../src/tui-session-events.ts","../../src/tui-state-manager.ts","../../src/terminal-handoff-controller.ts","../../src/types.ts","../../src/tui-app-channel-port.ts","../../src/attention/attention-tracker.ts","../../src/tui-channel-options.ts","../../src/TuiInteractionChannel.ts","../../src/keybindings/keybinding-catalogue.ts","../../src/keybindings/keybinding-registry.ts","../../src/keybindings/node-keybindings-source.ts","../../src/screen-reader-announcement.ts","../../src/theme/theme-contracts.ts","../../src/theme/built-in-themes.ts","../../src/theme/theme-registry.ts","../../src/tui-cli-adapter.ts","../../src/render.tsx","../../src/SupervisedSessionView.tsx","../../src/create-default-tui-cli-adapter.ts","../../src/theme/theme-document.ts"],"mappings":";;;;;;;;;;UA4CiB;WACN;aAA0B;aAAkC;;WAC5D;aAAqB;aAAkC;;;;;;UC3CjD;WACN;WACA;;;;UCkCM;EACf;EACA;;;EAOA;;KAGU;EACN;EAAqB,SAAS;;EAC9B;EAAiC,SAAS;;EAC1C;EAAuB,SAAS;;;;;;;;;KC1B1B,gBAAgB,KAAK;;EAE/B;;cA2BW;EAEX,SAAS;;;;;UAKD;EAER;EACA,aAAa;EACb;EACA;EACA;EACA,cAAc;EACd,4BAA4B;EAC5B;;EAEA;;EAEA;mBACiB;;WAER,qBARmB;;EAW5B;UAGQ;UACA;UACA;;UAGA;UASA;UAUA;EAMR,cAAe;EAOf,cAAe,OAAO;EAQtB,YAAa,OAAO;EAgBpB,aAAc;EAkBd,aAAc,QAAQ;EActB;EASA,UAAW,QAAQ;EAYnB,kBAAmB,OAAO;;;;;;EAe1B,YAAY,SAAS;;EAiBrB,SAAS,OAAO;;EAUhB,YAAY,OAAO;EAKnB;;EAWA,iBAAiB;;EAMjB,YAAY;;EAMZ,gBAAgB,OAAO;EAKvB,sBAAsB,OAAO;EAK7B,kBAAkB;EAKlB,6BAA6B,OAAO,OAAO,OAAO;EAKlD,+BAA+B,UAAU;EAgBzC,8BAA8B;;;;;;EAe9B;;;;;UCpTe;;EAEf,WAAW;;EAEX;;;;;;;UAQe;;EAEf,qBAAqB;EACrB;;;UAIe;EACf;;cAGW,qCAAqC;UACxC;UACA;UACA;;;;;EAMR,qBAAqB,OAAO;;EAQ5B,qBAAqB,OAAO;;EAK5B,eAAe,UAAU;MAIrB;EAME,gBAAgB,GAAG,UAAU,QAAQ,KAAK,QAAQ;;;;;;;;KC3D9C,oBAAoB;UAEf;EACf;EACA,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AAoB;EACpB,iBAAiB;EACjB,YAAY;EACZ,6BAA6B,UAAU;EACvC;;EAEA;;EAEA;;EAEA;;EAEA;;;;;EAKA,kBAAkB,SAAS;;;;;EAK3B,cAAc;;EAEd,kBAAkB;;EAElB,eAAe;;;;;;;EAOf;;EAEA,qBAAqB;;EAErB,uBAAuB;;EAEvB,sBAAsB;;EAEtB;;EAEA,oBAAoB;;;;;EAKpB,gBAAgB;;EAEhB;;EAEA,wBAAwB;;;;;EAKxB;;;;;;;EAOA,gBAAgB;EAChB,sBAAsB;EACtB;;iBA0IoB,UAAU,SAAS,iBAAiB;;;UC/WzC;WACN;WACA;WACA;WACA;WACA;WACA;WACA;WACA;aAAgB;aAAsB;aAAuB;aAC3D;;WACF;;UAGM;WACN,WAAW,QAAQ,gBAAgB,iBAAiB;WACpD,UAAU,eAAe;WACzB,gBAAgB;WAChB,YAAY,YAAY,gBAAgB;WACxC;WACA;WACA;WACA,cAAc;WACd;;cAGL;KACD,gBAAgB;iBAsYC,4BACpB,SAAS;WACE;WACA,sBAAsB;WACtB;IAEV;;;UCnac;EACf,8BAA8B;EAC9B,4BAA4B,UAAU;EACtC;EACA,0BAA0B;EAC1B,uBAAuB;;iBAGT,6BACd,qBACA,2BACA,kBACA,iBACA,uBACC,+BAA+B;;;UCFjB;;WAEN;;WAEA;WACA,QAAQ;WACR;;KAGC;WACC;WAAmB,OAAO;;WAAyB;WAAoB;;;;;;;;;;;;;;;;;iBAwBpE,eAAe;;;;;iBAWf,gBAAgB;;;;;;iBAShB,mBAAmB;;;;;;iBAyKnB,mBAAmB,OAAO,sBAAsB"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/screen-reader-pacing.ts","../../src/terminal-capabilities-context.tsx","../../src/terminal-handoff-controller.ts","../../src/tui-session-events.ts","../../src/tui-state-manager.ts","../../src/types.ts","../../src/tui-app-channel-port.ts","../../src/attention/attention-tracker.ts","../../src/tui-channel-options.ts","../../src/TuiInteractionChannel.ts","../../src/attached-session-connection.ts","../../src/keybindings/keybinding-catalogue.ts","../../src/keybindings/keybinding-registry.ts","../../src/keybindings/node-keybindings-source.ts","../../src/screen-reader-announcement.ts","../../src/theme/theme-contracts.ts","../../src/theme/built-in-themes.ts","../../src/theme/theme-registry.ts","../../src/tui-cli-adapter.ts","../../src/wire-tui-client-commands.ts","../../src/render.tsx","../../src/SupervisedSessionView.tsx","../../src/create-default-tui-cli-adapter.ts","../../src/theme/theme-document.ts"],"mappings":";;;;;;;;;;;UA4CiB;WACN;aAA0B;aAAkC;;WAC5D;aAAqB;aAAkC;;;;;;UC3CjD;WACN;WACA;;;;;UCQM;;EAEf,WAAW;;EAEX;;;;;;;UAQe;;EAEf,qBAAqB;EACrB;;;UAIe;EACf;;cAGW,qCAAqC;UACxC;UACA;UACA;;;;;EAMR,qBAAqB,OAAO;;EAQ5B,qBAAqB,OAAO;;EAK5B,eAAe,UAAU;MAIrB;EAME,gBAAgB,GAAG,UAAU,QAAQ,KAAK,QAAQ;;;;UCvBzC;EACf;EACA;;;EAOA;;KAGU;EACN;EAAqB,SAAS;;EAC9B;EAAiC,SAAS;;EAC1C;EAAuB,SAAS;;;;;;;;;KChC1B,gBAAgB,KAAK;;EAE/B;;cA2BW;EAEX,SAAS;;;;;UAKD;EAER;EACA,aAAa;EACb;EACA;EACA;EACA,cAAc;EACd,4BAA4B;EAC5B;;EAEA;;EAEA;mBACiB;;WAER,qBARmB;;EAW5B;UAGQ;UACA;UACA;;UAGA;UASA;UAUA;EAMR,cAAe;EAOf,cAAe,OAAO;EAQtB,YAAa,OAAO;EAgBpB,aAAc;EAkBd,aAAc,QAAQ,KAAK;EAc3B;EASA,UAAW,QAAQ;EAYnB,kBAAmB,OAAO;;;;;;EAe1B,YAAY,SAAS;;;;;;EAWrB,gBAAgB,kBAAkB,iBAAiB,iBAAiB;UAK5D;;EAeR,SAAS,OAAO;;EAUhB,YAAY,OAAO;EAKnB;;EAWA,iBAAiB;;EAMjB,YAAY;;EAMZ,gBAAgB,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